Skip to content
This repository has been archived by the owner on May 17, 2021. It is now read-only.

Commit

Permalink
added replication (sync) with localhost couchdb
Browse files Browse the repository at this point in the history
  • Loading branch information
sleidig committed Sep 18, 2015
1 parent 73a3464 commit 848f974
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion app/model/child.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@ angular.module('myApp.child', [

.factory('childrenManager', ['pouchDB', '$q', 'Child', function (pouchDB, $q, Child) {
var db = pouchDB('hdb');
var rep = db.replicate.sync('http://localhost:5984/hdb', {
live: true,
retry: true
});


var childrenManager = {
_pool: {},
Expand Down Expand Up @@ -88,7 +93,6 @@ angular.module('myApp.child', [
db.allDocs({include_docs: true, descending: true})
.then(function (dataArray) {
var items = [];
console.log(dataArray);
dataArray.rows.forEach(function (row) {
var data = row.doc;
var o = scope._retrieveInstance(data._id, data);
Expand Down

0 comments on commit 848f974

Please sign in to comment.