1ngOnInit() {
2 // first way
3 this.userType = this.route.snapshot.queryParamMap.get("userType");
4 this.list = this.route.snapshot.queryParamMap.get("list");
5 // second way
6 this.route.queryParamMap.subscribe(queryParams => {
7 this.userType = queryParams.get("userType");
8 this.list = queryParams.get("list");
9 })
10}
11