src/app/timeout/timeout.guard.ts
Methods |
constructor(timeoutService: TimeoutService)
|
||||||
Defined in src/app/timeout/timeout.guard.ts:7
|
||||||
Parameters :
|
canActivate |
canActivate()
|
Defined in src/app/timeout/timeout.guard.ts:9
|
Returns :
boolean
|
import { Injectable } from '@angular/core';
import { CanActivate } from '@angular/router';
import { TimeoutService } from './timeout.service';
@Injectable()
export class TimeoutGuard implements CanActivate {
constructor(private timeoutService: TimeoutService) {}
canActivate(): boolean {
this.timeoutService.startTimer();
return true;
}
}