Returning an Observable<boolean> from canActivate method and redirect on false
问题 I have been searching for a solution with no luck. I need to call the server if a user is authorized and i need canActivate method to wait for the result for that call. But i can`t seem to put pieces together. Below is my code, my question is in the comments of the code. canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable<boolean> { let user: EUser = new EUser(); user.sessionId = localStorage.getItem("sessionId"); //I am not sure how to implement this part. // I