Answers for "route navigate angular 11"

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
0

router.navigate angular

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

constructor(
    private router:Router
  ) { }

redirectFunction(){
      this.router.navigate(['hello/redirect/pageURL'],{queryParams:{id:1234,name:"ash"}});
}
Posted by: Guest on September-08-2021

Code answers related to "route navigate angular 11"

Code answers related to "Javascript"

Browse Popular Code Answers by Language