Reputation: 11208
How can you get the route params (e.g. companyId in the picture) from a child component?
So far, the following has not worked:
this.companyId = this.route.snapshot.params.companyId;
if (!this.companyId)
this.companyId = this.route.parent.snapshot.params.companyId;
Upvotes: 0
Views: 711
Reputation: 1251
Add the option {paramsInheritanceStrategy: 'always'}
to your Router.forRoot()
.
Upvotes: 2