diff --git a/README.md b/README.md index 34ab35b..e188e85 100644 --- a/README.md +++ b/README.md @@ -5,10 +5,35 @@ An Angular module that gives you access to the browsers local storage, **v0.1.1* [![Build Status](https://secure.travis-ci.org/grevory/angular-local-storage.png?branch=master)](https://travis-ci.org/grevory/) +##Table of contents: +- [Configuration](#configuration) + - [setPrefix](#setprefix) + - [setStorageType](setstoragetype) + +##Configuration +###setPrefix +You could set a prefix to avoid overwriting any local storage variables from the rest of your app
+**Default prefix:** `ls.` +```js +myApp.config(function (localStorageServiceProvider) { + localStorageServiceProvider + .setPrefix('yourAppName'); +}); +``` +###setStorageType +You could change web storage type to localStorage or sessionStorage
+**Default storage:** `localStorage` +```js +myApp.config(function (localStorageServiceProvider) { + localStorageServiceProvider + .setStorageType('sessionStorage'); +}); +``` + ##Installation: ```bash -bower install angular-local-storage +$ bower install angular-local-storage ``` Example use: