I use angular9, rxjs6 and implement canActive: Observable
But I got an error when use catchError, like this:
How can I fix this?
I use angular9, rxjs6 and implement canActive: Observable
But I got an error when use catchError, like this:
How can I fix this?
another way to solve canActivate function in your guard is only use subscribe because i think use map in this situation is wrong
this.yourService.subscribe(
(r) => {
//your code
return true;
},
(error: any) => {
return false;
}
);