I tried to do that in ngOnInit() like:
ngOnInit() {
this.route.queryParams
.filter(params => params.type)
.subscribe(params => {
this.tab = params.type;
this.setHeader();
});
}
My URL is:
http://localhost:4200/s/6/t/p/create/1
Routing is:
{path: ':Id/t/p/create/:type', component: CalendarComponent},