Answers for "angular route a component to a url"

1

angular go to route

import {Router} from '@angular/router';

constructor(private router: Router) {}

navigateToLogin() {
   this.router.navigateByUrl('/login');
}
Posted by: Guest on March-22-2021
3

angular access page route

this.router.navigate(['/customers']);
Posted by: Guest on August-18-2021
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 "angular route a component to a url"

Code answers related to "Javascript"

Browse Popular Code Answers by Language