1.1.0 • Published 6 years ago

session-heartbeat v1.1.0

Weekly downloads
8
License
MIT
Repository
github
Last release
6 years ago

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";