Skip to content

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

Notifications You must be signed in to change notification settings

khizarnaeem/localStorageService

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 

Repository files navigation

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();

About

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

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published