{"action":"created","issue":{"url":"https://api.github.com/repos/aurelia/router/issues/125","labels_url":"https://api.github.com/repos/aurelia/router/issues/125/labels{/name}","comments_url":"https://api.github.com/repos/aurelia/router/issues/125/comments","events_url":"https://api.github.com/repos/aurelia/router/issues/125/events","html_url":"https://github.com/aurelia/router/issues/125","id":87357162,"number":125,"title":"Incorrect slashes in navigateToRoute()","user":{"login":"metatribal","id":5251964,"avatar_url":"https://avatars.githubusercontent.com/u/5251964?v=3","gravatar_id":"","url":"https://api.github.com/users/metatribal","html_url":"https://github.com/metatribal","followers_url":"https://api.github.com/users/metatribal/followers","following_url":"https://api.github.com/users/metatribal/following{/other_user}","gists_url":"https://api.github.com/users/metatribal/gists{/gist_id}","starred_url":"https://api.github.com/users/metatribal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/metatribal/subscriptions","organizations_url":"https://api.github.com/users/metatribal/orgs","repos_url":"https://api.github.com/users/metatribal/repos","events_url":"https://api.github.com/users/metatribal/events{/privacy}","received_events_url":"https://api.github.com/users/metatribal/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-06-11T14:00:14Z","updated_at":"2015-06-11T14:08:18Z","closed_at":null,"body":"`navigate` and `navigateToRoute` generate urls which are missing the `/` following the `#` e.g. `http://127.0.0.1:9000/#welcome` instead of `http://127.0.0.1:9000/#/welcome`\r\n\r\nThis issue can be recreated by making the following changes to navigation-skeleton's `app.js`\r\n\r\n```\r\nimport 'bootstrap';\r\nimport 'bootstrap/css/bootstrap.css!';\r\n\r\nexport class App {\r\n  configureRouter(config, router){\r\n    config.title = 'Aurelia';\r\n    config.map([\r\n      // ADDED NAME PARAMETERS\r\n      { route: ['','welcome'],  name: 'welcome', moduleId: './welcome',      nav: true, title:'Welcome' },\r\n      { route: 'flickr',        name: 'flickr', moduleId: './flickr',       nav: true, title:'Flickr' },\r\n      { route: 'child-router',  name: 'rootchild', moduleId: './child-router', nav: true, title:'Child Router' }\r\n    ]);\r\n     // ADDED mapUnknownRoutes()\r\n\tconfig.mapUnknownRoutes(instruction => {\r\n\t\trouter.navigateToRoute('welcome')\r\n                // router.navigate('#/welcome')   // same results\r\n                // router.navigate('/#/welcome')  // same results\r\n\t})\r\n    this.router = router;\r\n  }\r\n}\r\n```\r\n\r\nAn unmapped url, such as `http://127.0.0.1:9000/#/foo` will result in `http://127.0.0.1:9000/#foo`\r\n\r\nAdditionally, `router.generate('welcome')` and \r\n`<a route-href=\"route: welcome;\">Welcome!</a>`\r\ngenerate the following fragment `#/welcome`.  Should it include a leading `/`?  I'm not sure.\r\n\r\nTested in green Safari and Chrome on OSX Yosemite."},"comment":{"url":"https://api.github.com/repos/aurelia/router/issues/comments/111147588","html_url":"https://github.com/aurelia/router/issues/125#issuecomment-111147588","issue_url":"https://api.github.com/repos/aurelia/router/issues/125","id":111147588,"user":{"login":"metatribal","id":5251964,"avatar_url":"https://avatars.githubusercontent.com/u/5251964?v=3","gravatar_id":"","url":"https://api.github.com/users/metatribal","html_url":"https://github.com/metatribal","followers_url":"https://api.github.com/users/metatribal/followers","following_url":"https://api.github.com/users/metatribal/following{/other_user}","gists_url":"https://api.github.com/users/metatribal/gists{/gist_id}","starred_url":"https://api.github.com/users/metatribal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/metatribal/subscriptions","organizations_url":"https://api.github.com/users/metatribal/orgs","repos_url":"https://api.github.com/users/metatribal/repos","events_url":"https://api.github.com/users/metatribal/events{/privacy}","received_events_url":"https://api.github.com/users/metatribal/received_events","type":"User","site_admin":false},"created_at":"2015-06-11T14:08:18Z","updated_at":"2015-06-11T14:08:18Z","body":"I also noticed this error when calling `navigate`\r\n`message: \"undefined is not an object (evaluating 'name.trim')\"`\r\n\r\n```\r\nstack: \"relativeToFile@http://127.0.0.1:9000/#welcome:36:16↵loadRoute@http://127.0.0.1:9000/#:40:38↵loadComponent@http://127.0.0.1:9000/#:83:33↵loadRoute@http://127.0.0.1:9000/#:55:25↵http://127.0.0.1:9000/#:14:23↵map@[native code]↵loadNewRoute@http://127.0.0.1:9000/#:13:34↵run@http://127.0.0.1:9000/#:138:30↵run@[native code]↵next@http://127.0.0.1:9000/#:73:35↵iterate@http://127.0.0.1:9000/#:31:20↵inspect@http://127.0.0.1:9000/#:15:23↵processPotential@http://127.0.0.1:9000/#:28:23↵iterate@http://127.0.0.1:9000/#:26:34↵processDeactivatable@http://127.0.0.1:9000/#:35:19↵run@http://127.0.0.1:9000/#:190:38↵run@[native code]↵next@http://127.0.0.1:9000/#:73:35↵http://127.0.0.1:9000/#:142:24↵run@http://127.0.0.1:9000/#:83:45↵http://127.0.0.1:9000/#:97:14↵exports@http://127.0.0.1:9000/#:6:27↵http://127.0.0.1:9000/#:42:15↵run@http://127.0.0.1:9000/#:29:9↵listner@http://127.0.0.1:9000/#:33:13\"\r\n```\r\n"}}