Closed rafaelcb21 closed 7 years ago
I got to work, follows the change in the logout() function:
logout() {
this.idle.stop();
this._headerService.exit()
.subscribe(
data => {
localStorage.clear();
this._router.navigate(['/auth']);
},
error => console.log(error)
)
}
My problem is that when click on the logout button ng2-idle continues working. And to try to solve this problem I set again the setIdle and setTimeout functions for 1 second.
However, when the user is transferred to the login screen, the app takes 1 second to give the timeout.
I like to know if have any way of forcing the timeout or end ng2-idle after click the logout button that call logout() function.