Skip to main content
added 156 characters in body
Source Link

You can use ActivatedRoute to get the current router

Original Answer (for RC version)

I found a solution on AngularJS Google Group and it's so easy!

ngOnInit() { this.router.subscribe((url) => console.log(url)); } 

Here's the original answer

https://groups.google.com/d/msg/angular/wn1h0JPrF48/zl1sHJxbCQAJ

I found a solution on AngularJS Google Group and it's so easy!

ngOnInit() { this.router.subscribe((url) => console.log(url)); } 

Here's the original answer

https://groups.google.com/d/msg/angular/wn1h0JPrF48/zl1sHJxbCQAJ

You can use ActivatedRoute to get the current router

Original Answer (for RC version)

I found a solution on AngularJS Google Group and it's so easy!

ngOnInit() { this.router.subscribe((url) => console.log(url)); } 

Here's the original answer

https://groups.google.com/d/msg/angular/wn1h0JPrF48/zl1sHJxbCQAJ

Source Link

I found a solution on AngularJS Google Group and it's so easy!

ngOnInit() { this.router.subscribe((url) => console.log(url)); } 

Here's the original answer

https://groups.google.com/d/msg/angular/wn1h0JPrF48/zl1sHJxbCQAJ