{"action":"created","issue":{"url":"https://api.github.com/repos/angular-ui/ui-router/issues/3038","repository_url":"https://api.github.com/repos/angular-ui/ui-router","labels_url":"https://api.github.com/repos/angular-ui/ui-router/issues/3038/labels{/name}","comments_url":"https://api.github.com/repos/angular-ui/ui-router/issues/3038/comments","events_url":"https://api.github.com/repos/angular-ui/ui-router/issues/3038/events","html_url":"https://github.com/angular-ui/ui-router/issues/3038","id":179237723,"number":3038,"title":"Match any and all query parameters in ui-router state","user":{"login":"npm622","id":1653615,"avatar_url":"https://avatars.githubusercontent.com/u/1653615?v=3","gravatar_id":"","url":"https://api.github.com/users/npm622","html_url":"https://github.com/npm622","followers_url":"https://api.github.com/users/npm622/followers","following_url":"https://api.github.com/users/npm622/following{/other_user}","gists_url":"https://api.github.com/users/npm622/gists{/gist_id}","starred_url":"https://api.github.com/users/npm622/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/npm622/subscriptions","organizations_url":"https://api.github.com/users/npm622/orgs","repos_url":"https://api.github.com/users/npm622/repos","events_url":"https://api.github.com/users/npm622/events{/privacy}","received_events_url":"https://api.github.com/users/npm622/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-09-26T14:04:27Z","updated_at":"2016-09-26T15:43:08Z","closed_at":null,"body":"Apologies in advance if a GitHub issue is not the proper forum for this question -- I raised a [StackOverflow question](http://stackoverflow.com/questions/39680065/how-to-configure-angular-ui-router-state-that-will-match-any-and-all-present-que) a few days back and have received zero responses, so I thought I'd turn here.\r\n\r\nI am using UI-Router 1.x.  It seems that dynamic parameters are *nearly* what I'm looking for, however, I do not know the names of the parameters I should be expecting, so I cannot explicitly list them and provide defaults (as dynamic parameters need).\r\n\r\nThe gist of it is, I'd like the following URLS all to route to the same component:\r\n\r\n* `#/.../update?id`\r\n* `#/.../update?username`\r\n* `#/.../update?customerId&sandwichId`\r\n\r\nThe routed component has an `$onInit` method that, along with a provided service, has enough information to parse whatever query parameters happen to be there.  However, I cannot get the state to be activated without specifying each and every potential name of query parameter that could come through.  These query parameter names are data driven, so I don't even have a finite set to do this with.\r\n\r\nI have a non-ideal solution currently: I define one query parameter on the state, `pkKeys`, and then manually construct the entire query parameter string I desire and set that as `pkKeys`' value.  In my routed component's controller, I take on additional pre-step in parsing that entire query string value by splitting on '&' and '='...  Obviously it's *not great*, but it does align with my desired functionality.\r\n\r\nI have tried to leverage $location.search() to supply query parameters, but have had no success with this so far.\r\n\r\nIt feels like I'm just asking for tips here, and I should just wait it out on StackOverflow.  But I've spent 3 days now tinkering with the different approaches found in the ui-router guide to no avail.  If this is something that just isn't supported, knowing that would at least save me some time here.\r\n\r\nThanks in advance for any help!\r\n\r\n-Nick"},"comment":{"url":"https://api.github.com/repos/angular-ui/ui-router/issues/comments/249608775","html_url":"https://github.com/angular-ui/ui-router/issues/3038#issuecomment-249608775","issue_url":"https://api.github.com/repos/angular-ui/ui-router/issues/3038","id":249608775,"user":{"login":"npm622","id":1653615,"avatar_url":"https://avatars.githubusercontent.com/u/1653615?v=3","gravatar_id":"","url":"https://api.github.com/users/npm622","html_url":"https://github.com/npm622","followers_url":"https://api.github.com/users/npm622/followers","following_url":"https://api.github.com/users/npm622/following{/other_user}","gists_url":"https://api.github.com/users/npm622/gists{/gist_id}","starred_url":"https://api.github.com/users/npm622/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/npm622/subscriptions","organizations_url":"https://api.github.com/users/npm622/orgs","repos_url":"https://api.github.com/users/npm622/repos","events_url":"https://api.github.com/users/npm622/events{/privacy}","received_events_url":"https://api.github.com/users/npm622/received_events","type":"User","site_admin":false},"created_at":"2016-09-26T15:43:08Z","updated_at":"2016-09-26T15:43:08Z","body":"Understood, thank you at least for the clarification.\r\n\r\nIn terms of handling \"this issue\", I'll defer to you as to what's best here.  I'd love to somehow be notified if/when functionality like this does make its way to ui-router, however, I by no means need to this specific issue remain open for something that's not even prioritized yet.  Apologies if there's an obvious natural progression of this, I'm new to the open-source game."}}
{"actor":{"display_login":"npm622"}}