bearnithi / bn-ng-idle

Angular user idle detector service
28 stars 11 forks source link

Just a small typo in readme #5

Closed csegyud closed 4 years ago

csegyud commented 4 years ago

Hi, thanks for the nice work! 👍

I just have found a small typo in your readme. In the ngOnInit function you check for res instead of isTimedOut.

  // initiate it in your component OnInit
  ngOnInit(): void {
    this.bnIdle.startWatching(60).subscribe((isTimedOut: boolean) => {
      // if (res) { <--- should be as below 
      if (isTimedOutt) {
        console.log('session expired');
      }
    });
  }
bearnithi commented 4 years ago

Thank you @csegyud. I have fixed the typo.