How can I access the querystring
parameters from my component? I have URLs like this:
http://myurl.com/myroute?myparam=1
thanks
How can I access the querystring
parameters from my component? I have URLs like this:
http://myurl.com/myroute?myparam=1
thanks
Hint The RC.1
@angular/router
is also deprecated. It's better to stick with@angular/router-deprecated
(because it has more features and is quite stable) until a new new router is shipped.If you are using router-deprecated then
constructor(private params: RouteParams)
will give you access to all parameters, then you can get specific parameter byparams.get('myparam')
working of Router in RC is not yet documented, but you can get hold of params in routerOnActivate