Skip to content

Latest commit

 

History

History
25 lines (18 loc) · 545 Bytes

README.md

File metadata and controls

25 lines (18 loc) · 545 Bytes

AngularJS Session Manager

AngularJS module to make browser's LocalStorage act like SessionStorage.
It clears the browser localstorage when user leaves the last tab of your website.

Usage

Without prefix:

app.run(function (sessionManager) {
    sessionManager.start();
});

With prefix:

app.run(function (sessionManager) {
    sessionManager.start('example_');
});

If prfix is defined, only localStorage items with that prefix will be removed.
Otherwise, localStorage will be completely cleared.