When using the aurelia.io framework router, what is the preferred method for reading and setting a query string?
For example, in the url: http://www.myapp.com/#/myroute1/?s=mystate
How do I read and set the ?s=mystate
part of the url and have the aurelia router navigate correctly and remember that state, such that whenever I arrive in my route1
viewmodel I can read that state variable and do something with it?
On viewmodel you can implement method activate(params, routeConfig) and object params should contain your query variables
To navigate to some route, you have to specify the name of this route in app.js (name: 'redirect')
and then use method NavigateToRoute with parameters.