this.router.navigate with params code example
Example 1: 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'
}
Example 2: router params angular
// Navigate and send Params
this.router.navigate(['/users/edit/', user.id]);