In my angular 7 code I'm trying to fetch the clientId passed in the URL. clientId will be dynamic.
localhost:4200/client/xyz
app.routing.ts
{
path: 'client/:clientId',
component: AppComponent
},
app.component.ts
constructor(private route: ActivatedRoute) { }
ngOnInit() {
console.log(this.route.snapshot.paramMap.get('clientId'));
});
It prints null in the console