I am trying to show pop up when the user is inactive for 5 minutes.
timeout() {
setTimeout(() => this.openDialog(), 4000);
}
<h2 mat-dialog-title>Alert!</h2>
<mat-dialog-content class="mat-typography">
</mat-dialog-content>
<mat-dialog-actions align="end">
<button mat-button mat-dialog-close>Cancel</button>
<button mat-button [mat-dialog-close]="true"cdkFocusInitial>Ok</button>
</mat-dialog-actions>
In the code above the this.openDialog()
dialog displays when you open the page after 2 seconds. But I want to display the pop up when user is inactive for 5 minutes.