Created
May 21, 2019 18:02
-
-
Save arturovt/44723055f9cd7aa4b24812b9e6414042 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Injectable({ providedIn: 'root' }) | |
export class AuthGuard implements CanActivate { | |
constructor(private store: Store) {} | |
public canActivate(): boolean { | |
const { isAuthenticated } = this.store.selectSnapshot<AuthStateModel>(AuthState); | |
return isAuthenticated; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment