Closed InbarTakdim closed 1 year ago
what can be the reason of routeStateSnapshot is undefined it the funstion of redirect?
permissions: { only: [Roles.LOCATION_ENERGY, Roles.LOCATION_MAP], redirectTo: { LOCATION_ENERGY: ( rejectedPermissionName: string, activateRouteSnapshot: ActivatedRouteSnapshot, routeStateSnapshot: RouterStateSnapshot ): string => { return ${routeStateSnapshot?.url}/1; }, LOCATION_MAP: ( rejectedPermissionName: string, activateRouteSnapshot: ActivatedRouteSnapshot, routeStateSnapshot: RouterStateSnapshot ): string => { return ${routeStateSnapshot?.url}/2; } } }
${routeStateSnapshot?.url}/1
${routeStateSnapshot?.url}/2
I'm sorry ite better to ask on stackoverflow or chatGpt. The problem is with overrall solution not with library
permissions: { only: [Roles.LOCATION_ENERGY, Roles.LOCATION_MAP], redirectTo: { LOCATION_ENERGY: ( rejectedPermissionName: string, activateRouteSnapshot: ActivatedRouteSnapshot, routeStateSnapshot: RouterStateSnapshot ): string => { return
${routeStateSnapshot?.url}/1
; }, LOCATION_MAP: ( rejectedPermissionName: string, activateRouteSnapshot: ActivatedRouteSnapshot, routeStateSnapshot: RouterStateSnapshot ): string => { return${routeStateSnapshot?.url}/2
; } } }