我的路线
{ path: 'my-products/manage-products', component:ManageProductsComponent,canActivate:[AuthGuard], }
搜索参数后生成的url如下所示:
http://localhost:4200/my-products/manage-products?include_available_params=1&key=title&value=dharmesh&inrange=1&page=1&show=&sort_by=
我的身份验证码:
canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot)
{
this.currentPath = route.url[0].path;
}
我的问题是有时我在路由获取查询参数后得到route.url为空。