I have project-based angular 12.
I need to secure a route based on a parameter which is colled token:
export const authenticationRoutes = [
{
path: 'reset-password/token/:token',
component: ResetPasswordShellComponent,
canActivate: [ResetPasswordGuard]
}
];
ResetPasswordGuard is a guard that makes calls to web service and should send token value which is part of the path:
path: 'reset-password/token/:token'
My question is there any way to pass token value from the path to guard(ResetPasswordGuard) so it will be sent to the web service?