{"action":"created","issue":{"url":"https://api.github.com/repos/angular/router/issues/176","labels_url":"https://api.github.com/repos/angular/router/issues/176/labels{/name}","comments_url":"https://api.github.com/repos/angular/router/issues/176/comments","events_url":"https://api.github.com/repos/angular/router/issues/176/events","html_url":"https://github.com/angular/router/issues/176","id":61685007,"number":176,"title":"Query Params and Route matching","user":{"login":"kamrenz","id":2532726,"avatar_url":"https://avatars.githubusercontent.com/u/2532726?v=3","gravatar_id":"","url":"https://api.github.com/users/kamrenz","html_url":"https://github.com/kamrenz","followers_url":"https://api.github.com/users/kamrenz/followers","following_url":"https://api.github.com/users/kamrenz/following{/other_user}","gists_url":"https://api.github.com/users/kamrenz/gists{/gist_id}","starred_url":"https://api.github.com/users/kamrenz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kamrenz/subscriptions","organizations_url":"https://api.github.com/users/kamrenz/orgs","repos_url":"https://api.github.com/users/kamrenz/repos","events_url":"https://api.github.com/users/kamrenz/events{/privacy}","received_events_url":"https://api.github.com/users/kamrenz/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-03-14T19:45:34Z","updated_at":"2015-03-15T15:17:05Z","closed_at":null,"body":"Is there a way for us to specify in our router.config query parameters?\r\nI would like to hit something like the following URL\r\n```\r\n#/information/42/wisdom?isUser='car'\r\n```\r\nIf I map my router like the following my information controller get's triggered, but the $routeParams only has {id: 42, type: 'wisdom'}. No isUser property is in the object.\r\n```\r\n  $router.config([\r\n    { path: '/information/:id/:type', component: 'information' }\r\n  ]);\r\n```\r\nIf I map my router like the following my information controller get's triggered, but the $routeParams has {id: \"42\", type?isUser: \"wisdom\"}. The type and isUser properties are not separated and still no query parameter\r\n```\r\n  $router.config([\r\n    { path: '/information/:id/:type?isUser', component: 'information' }    \r\n  ]);\r\n```\r\nIf I map my router like the following my information controller doesn't get triggered.\r\n```\r\n  $router.config([\r\n    { path: '/information/:id/:type?isUser', component: 'information' }    \r\n  ]);\r\n```"},"comment":{"url":"https://api.github.com/repos/angular/router/issues/comments/81085073","html_url":"https://github.com/angular/router/issues/176#issuecomment-81085073","issue_url":"https://api.github.com/repos/angular/router/issues/176","id":81085073,"user":{"login":"krimple","id":4246,"avatar_url":"https://avatars.githubusercontent.com/u/4246?v=3","gravatar_id":"","url":"https://api.github.com/users/krimple","html_url":"https://github.com/krimple","followers_url":"https://api.github.com/users/krimple/followers","following_url":"https://api.github.com/users/krimple/following{/other_user}","gists_url":"https://api.github.com/users/krimple/gists{/gist_id}","starred_url":"https://api.github.com/users/krimple/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/krimple/subscriptions","organizations_url":"https://api.github.com/users/krimple/orgs","repos_url":"https://api.github.com/users/krimple/repos","events_url":"https://api.github.com/users/krimple/events{/privacy}","received_events_url":"https://api.github.com/users/krimple/received_events","type":"User","site_admin":false},"created_at":"2015-03-15T15:17:05Z","updated_at":"2015-03-15T15:17:05Z","body":"+1 - I would hate to see functionality lost for this and making it complex to do things like bookmark or tweak things from the URL during testing. Right now it causes fits because it sees a duplicate route if you use two routes with the same path and different query strings, and the message isn't very useful when debugging:\r\n\r\n```javascript\r\n{ path: '/gallery/:id', component: 'gallery' },\r\n{ path: '/gallery/:id/edit', component: 'editGallery' }\r\n```\r\n\r\nleads to\r\n\r\n```text\r\nrouter.es5.js:953 Could not instantiate controller EditGalleryController\r\n2angular.js:11768 TypeError: Cannot read property '0' of undefined\r\n    at componentToCtrlDefault (router.es5.js:1126)\r\n    at componentLoader (router.es5.js:1138)\r\n    at Object.router.registerViewport.instantiate (router.es5.js:937)\r\n    at router.es5.js:789\r\n    at processQueue (angular.js:13988)\r\n    at angular.js:14004\r\n    at Scope.$get.Scope.$eval (angular.js:15211)\r\n    at Scope.$get.Scope.$digest (angular.js:15026)\r\n    at Scope.$get.Scope.$apply (angular.js:15316)\r\n    at done (angular.js:9804)\t\r\n```"}}