{
path: ':l/bla/bla/bla', component: ..., canActivate: [AuthGuard]
}
Then AuthGuard's constructor:
constructor(
private readonly router: Router,
private readonly activedRoute: ActivatedRoute) { }
... however both .params and .snapshot.params are empty and no :l parameter's value (shor for "language") can be read from there.
So question: how can I redirect to another page in case of unauthorized access, having my dynamic :l in place?
P.S. data does not work (does it?), since it is OKay for a compile-time known data rather than dynamic.
sovled the problem: method parameter should be prefered over constructor injection.