An indexedDB wrapper for Angular JS.
# Install via bower
bower install angularjs-indexeddb
# Install via npm
npm install git://github.com/gauravgango/gaurav-angular-indexeddb.git
Add angular-indexeddb.min.js
library to your project's index.html
<script src="https://github.com/gauravgango/gaurav-angular-indexeddb/raw/master/js/angular-indexeddb.min.js" type="text/javascript">
Add indexed-db
to you module dependency list
angular.module('myApp',['indexed-db']);
In your module config function state your database name, version and table schema
angular.module('myApp').config(function(indexeddbProvider){
indexeddbProvider.setDbName('test'); // your database name
indexeddbProvider.setDbVersion(1); // your database version
indexeddbProvider.setDbTables(tables); //tables is array of objects contains your schema for various tables
})
You can find detailed documentation here
MIT License