get route angular code example
Example 1: angular get current route
this.router.url === '/login'
Example 2: angular get router path
import {filter} from 'rxjs/operators';
router.events.pipe(
filter(event => event instanceof NavigationEnd)
)
.subscribe(event => {
console.log(event);
});