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
- Host: GitHub
- URL: https://github.com/msarsha/ng2-timeout-dialog
- Owner: msarsha
- Created: 2017-08-20T12:54:58.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2017-08-28T07:24:57.000Z (almost 9 years ago)
- Last Synced: 2025-08-17T09:48:11.656Z (10 months ago)
- Topics: angular, dialog, ngx, timeout
- Language: TypeScript
- Homepage: https://msarsha.github.io/ng2-timeout-dialog/
- Size: 7.81 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
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`.