0.1.1 • Published 8 years ago
ng2-timeout-dialog v0.1.1
ng2-timeout-dialog
Timeout dialog for your Angular applications.
DEMO https://msarsha.github.io/ng2-timeout-dialog/
How to use
npm install --save ng2-timeout-dialog- import
ShTimeoutModuleinto your app module
markup:
<sh-timeout [timeoutAfter]="10" [warningAfter]="2" (timeout)="onTimeout()">
<h1>Custom warning dialog content</h1>
</sh-timeout>component:
@Component({
...
})
export class MyComponent{
onTimeout(){
alert('timeout event fired!');
}
}Any mouse click or key press will reset the timeout counting.
Properties:
[timeoutAfter] (seconds) - Number of seconds the timeout event will be fired after.
[warningAfter] (seconds) - Optional property to show a dialog before the timeout event is fired.
(timeout) - Will be fired after the time defined in timeoutAfter.