localStorageService

localStorageService is an AngularJS based service module which can be used to store and retrieve data from local storage of browser.

Added by: Sam Deering

GitHub

Repository

khizarnaeem/localstorageservice

Stats

Stars: 1

Watchers: 1

Forks: 0

Module Description

Local Storage Service for AngularJS

localStorageService is an AngularJS based service module which can be used to store and retrieve data from local storage of browser.

Demo

Demo

Requirements

AngularJS verison 1.0.5+

How to use

Add a <script> to your index.html:

<script src="/path_to_js_file/localStorageModule.js"></script>

Create instance of service in Controller or js file:

var storage = localStorageService.create();

Give prefix to keys (optional):

storage.prefix = "Prefix";

this is optional but can be handy when you are using this service in multiple controllers

Store Value

storage.set("Key","Value to Store");

Get Value

storage.get("Key");

Remove Value

storage.remove("Key");

Clear Everything

storage.removeAll();

Module stats last updated: 2015-04-15 19:53:33

Disclaimer: Some data on this page may have been gathered from the authors GitHub respository. If you see any mistakes or outdated information please let us know. Thanks!