Search code examples
angularangular2-routing

How to get current route


The current docs only talk about getting route params, not the actual route segments.

For example, if i want to find the parent of current route, how is that possible?


Solution

  • The new V3 router has a url property.

    this.router.url === '/login'