works like a charm! thanks! 

On Monday, November 30, 2015 at 1:40:19 AM UTC+1, Eric Martinez wrote:
>
> Just subscribe to the router
>
> constructor(router: Router) {
>  
>      router.subscribe((url) => console.log(url));
>
> }
>
> That URL will hold the path of the route you are in. If you want the 
> Instruction, complement it with "recognize" :
>
> constructor(router: Router) {
>  
>      router.subscribe((url) => {
>           
>           // Current URL
>
>           router.recognize(url).then((instruction) => {
>               
>              console.log(instruction); // Current instruction
>
>           });
>
>      });
>
>
>
> }
>
>
>
>

-- 
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 http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to