})
/** Exporting a class @exports AppComponent */
export class AppComponent {
+ /** Handle idle time out @public */
+ public idleTime: number;
/** To inject services @public */
public injector: Injector;
/** Instance for modal service @public */
/** To handle handleIdle @public */
public handleIdle(): void {
- const idleTime: number = 1200;
+ if (!isNullOrUndefined((sessionStorage.getItem('timeout')))) {
+ this.idleTime = Number(sessionStorage.getItem('timeout'));
+ } else {
+ this.idleTime = 1200;
+ }
const idleTimeOutWarning: number = 5;
// sets an idle timeout in seconds.
- this.idle.setIdle(idleTime);
+ this.idle.setIdle(this.idleTime);
//sets a timeout period in seconds. after idleTime seconds of inactivity, the user will be considered timed out.
this.idle.setTimeout(idleTimeOutWarning);
// sets the default interrupts, in this case, things like clicks, scrolls, touches to the document