Angular 7 get current route site:stackoverflow.com code example Example: angular get current route this.router.url === '/login'