ng-pouchdb-collection
Pouchdb collection module for angular. Using the "one db per user" methodology, plugin takes in the user db and a collection name. Create a view for that collection, all dual bindings included for angular views, no need to call $scope.apply()
Special Thanks to @danielzen for his starter codebase
Setup
Requirements
- CouchDB v1.3.0+ or IrisCouch
- pouchdb
- pouchdb-upsert
- angular-pouchdb
Setup ng-pouchdb-collection
TODO: add bower and node
API
.controller('TodoCtrl', function(pouchCollection)
$scope.tasks = pouchCollection("user-db-test", "collecton2");
Add to Collection
$scope.tasks.$add({title: res, completed: false});
Update item in Collection
$scope.tasks.$update(task);
Remove from Collection
$scope.tasks.$remove(task);
testing
See demo folder with sample ionic project
License
Released under the MIT License.