1// Send user data
2let navigationExtras: NavigationExtras = {
3 state: {
4 user: this.user
5}
6
7this.router.navigate(['details'], navigationExtras);
8
9// Acess data in details page
10....
11constructor(private route: ActivatedRoute, private router: Router) {
12 this.route.queryParams.subscribe(params => {
13 if (this.router.getCurrentNavigation().extras.state) {
14 this.data = this.router.getCurrentNavigation().extras.state.user;
15 }
16 });
17 }
18}
19.....