How to extract query parameters with ui-router for AngularJS?

See the query parameters section of the URL routing documentation.

You can also specify parameters as query parameters, following a ‘?’:

url: "/contacts?myParam"
// will match to url of "/contacts?myParam=value"

For this example, if the url is /contacts?myParam=value then the value of $state.params will be:

{ myParam: 'value' }

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)