how to do canactive stackoverflow angular code example
Example: canactivate get current url
canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot) {
console.log(state.url);//'candidates'
}
canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot) {
console.log(state.url);//'candidates'
}