Answers for "router navigate pass params"

2

router navigate pass params

this.router.navigate(['action-selection'], { state: { example: 'bar' } });
...
constructor(private router: Router) {
  console.log(this.router.getCurrentNavigation().extras.state.example); 
  // should log out 'bar'
}
Posted by: Guest on December-08-2020

Code answers related to "router navigate pass params"

Code answers related to "TypeScript"

Browse Popular Code Answers by Language