Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F119769127
token-guard.service.ts
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Sun, Jun 29, 06:58
Size
408 B
Mime Type
text/x-java
Expires
Tue, Jul 1, 06:58 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
27063927
Attached To
R8244 Eawag_Swing_Weight_Elicitation
token-guard.service.ts
View Options
import { Injectable } from '@angular/core';
import { Router, CanActivate } from '@angular/router';
import { TokenService } from './token.service';
@Injectable()
export class TokenGaurdService implements CanActivate {
constructor(private tokenService: TokenService, private router: Router) {}
canActivate() {
if (!this.tokenService.isLoggedIn()) {
return false;
}
return true;
}
}
Event Timeline
Log In to Comment