session-heartbeat
v1.1.0
Published
A utility to detect when user is afk or session has expired
Downloads
6
Maintainers
Readme
Display a popup window when user is AFK or session expired.
You can also add a callback function to execute when used clicks the confirmation button.
Installation
npm install -S session-heartbeat
app.component.ts
...
import { SessionHeartbeat } from 'session-heartbeat';
@Component({
selector: 'my-app',
templateUrl: './app.component.html',
styleUrls: [ './app.component.css' ]
})
export class AppComponent {
constructor() {
}
ngOnInit() {
let heartbeat = new SessionHeartbeat();
heartbeat.init(1, 60, {
'title': 'Popup title',
'message': 'Popup details',
'button': 'Login'
});
}
}
src/styles.scss
@import "~session-heartbeat/session-heartbeat.css";