File

src/app/timeout/timeout.guard.ts

Index

Methods

Constructor

constructor(timeoutService: TimeoutService)
Parameters :
Name Type Optional
timeoutService TimeoutService no

Methods

canActivate
canActivate()
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;
  }
}

results matching ""

    No results matching ""