We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a813313 commit b4b515cCopy full SHA for b4b515c
README.md
@@ -104,8 +104,8 @@ constructor(private _tokenService: Angular2TokenService) {
104
105
globalOptions: {
106
headers: {
107
- 'Content-Type': 'application/json',
108
- 'Accept': 'application/json'
+ 'Content-Type': 'application/json',
+ 'Accept': 'application/json'
109
}
110
111
});
src/angular2-token.service.ts
@@ -44,8 +44,12 @@ export class Angular2TokenService implements CanActivate {
44
private _router: Router
45
) { }
46
47
+ userSignedIn(): boolean {
48
+ return !!this._currentAuthData;
49
+ }
50
+
51
canActivate() {
- if (this._currentUserData)
52
+ if (this.userSignedIn())
53
return true;
54
else {
55
0 commit comments