This doesn't seem to be working with angular 2.0.0-beta.0
On Sunday, November 29, 2015 at 6:40:19 PM UTC-6, 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 https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.