python (65.2k questions)
javascript (44.3k questions)
reactjs (22.7k questions)
java (20.8k questions)
c# (17.4k questions)
html (16.3k questions)
r (13.7k questions)
android (13k questions)
Cannot find name 'canActivate'
Guys i'm trying to make a auth guard to guard routes that someone who isnt authenticated cannot access. In my AuthService i imported Can Activate like this:
import { CanActivate, ActivatedRouteSnapsho...
Paula Bremenkamp
Votes: 0
Answers: 1
How to use same route guard for different routes that differ in authorization logic
For my Angular 6 project, I have one canactivate AuthGuard to load ComponentA.
I want to know can I use the same AuthGuard for component B where it's the authorization logic is exactly opposite to com...
LearnToCode
Votes: 0
Answers: 1
Angular How to implement CanActivate guard with HTTP Get call
For my Angular 6 project, we want to use CanActivate guard to check authorization.
To implement this, I need to call getSummary() http get call from app.service and perform some logic from its respons...
LearnToCode
Votes: 0
Answers: 1
Angular canActivate httpClient infinite loop
I have code like this:
auth.guard.ts
canActivate(): void {
const token = localStorage.getItem('token');
const refreshToken = localStorage.getItem('refreshToken');
if (!token || !refreshTo...

ame
Votes: 0
Answers: 2