Hi!

We are trying to start using Angular 2 in our product, but somethings 
blocking us to do this.

Just to exemplify: we need to can use an URL like this:   
weproject.abc:4200/login?param1=nick&token=123iajdd098fsd90faf

So, how can I get the "param1" and "nick" params value?
We try to use something like

(...)
this.sub = this.router
 .routerState 
 .queryParams

 .subscribe(params => { 

 this.selectedId = +params['id']; 

 this.service.getHeroes() 

.then(heroes => this.heroes = heroes); });


But nor 'nick' or 'param1' was found in 'params[]'. I think that Route 
params that we will find there are only that we was setted in routes 
config. 
So, how can I get this 'others' url params?

 


-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to