how to know the current route in angular 6 code example Example: angular get current route this.router.url === '/login'