Answers for "angular get route url"

3

angular get current route

this.router.url === '/login'
Posted by: Guest on December-27-2020
1

angular get route url

this.router.events
  .pipe(filter( event => event instanceof NavigationEnd))
  .subscribe(event => {
    this.router.navigate(['/tabs']);
  }
});
Posted by: Guest on March-25-2021

Code answers related to "TypeScript"

Browse Popular Code Answers by Language