An open API service indexing awesome lists of open source software.

https://github.com/msarsha/ng2-timeout-dialog

Timeout dialog for your Angular applications
https://github.com/msarsha/ng2-timeout-dialog

angular dialog ngx timeout

Last synced: about 1 month ago
JSON representation

Timeout dialog for your Angular applications

Awesome Lists containing this project

README

          

## 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 `ShTimeoutModule` into your app module

markup:
````html

Custom warning dialog content

````

component:
````typescript
@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`.