How to get current route
The new V3 router has a url property.
this.router.url === '/login'
Angular RC4:
You can import Router
from @angular/router
Then inject it:
constructor(private router: Router ) {
}
Then call it's URL parameter:
console.log(this.router.url); // /routename