angular get current route in component code example Example: angular get current route this.router.url === '/login'