I have been working on Angular project with routing , so lets consider a route like this below.
{
path : 'preview/:Id',
loadChildren : () => import('./path/preview/preview.module').then( m => m.PreviewModule),
}
So this route
could be having alphanumeric values like (a-zA-Z0-9) and also special character like /
, hash value produced by crypto.js like below.
preview/QQZnNw+VjBg/cAXvy6nxdiQ==
so In this above route param Id
will have some value like this QQZnNw+VjBg/cAXvy6nxdiQ==
, that is what am trying to achieve.
Error : But unfortunately am getting error stating unrecognised route because , this above value has "/" in its route.
Previously what i have tried is that i have tried adding regex like this /:Id(/[\\S]+/g)
to the route param so that it could accept this route ,
{
path : 'preview/:Id(/[\\S]+/g)',
loadChildren : () => import('./path/preview/preview.module').then( m => m.PreviewModule),
}
Please , can anyone help me find a way.