diff --git a/angular-pouchdb.coffee b/angular-pouchdb.coffee index 6490af4..90702a6 100644 --- a/angular-pouchdb.coffee +++ b/angular-pouchdb.coffee @@ -99,10 +99,10 @@ pouchdb.provider 'pouchdb', -> compact: qify db.compact.bind(db) revsDiff: qify db.revsDiff.bind(db) replicate: - to: db.replicate.to.bind(db) - from: db.replicate.from.bind(db) - sync: db.replicate.sync.bind(db) - destroy: qify db.destroy.bind(db) + to: PouchDB.replicate.bind(db, db) + from: (src, opts) -> PouchDB.replicate.bind(db)(src, db, opts) + sync: PouchDB.sync.bind(db, db) + destroy: qify PouchDB.destroy.bind(db, db) ] # pouch-repeat="name in collection" diff --git a/angular-pouchdb.js b/angular-pouchdb.js index 385592b..690133f 100644 --- a/angular-pouchdb.js +++ b/angular-pouchdb.js @@ -1,4 +1,4 @@ -// Generated by CoffeeScript 1.4.0 +// Generated by CoffeeScript 1.7.1 /* The MIT License @@ -22,8 +22,7 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - + */ (function() { var concat, exists, indexOf, pouchdb, slice, sortedIndex; @@ -125,11 +124,13 @@ THE SOFTWARE. compact: qify(db.compact.bind(db)), revsDiff: qify(db.revsDiff.bind(db)), replicate: { - to: db.replicate.to.bind(db), - from: db.replicate.from.bind(db), - sync: db.replicate.sync.bind(db) + to: PouchDB.replicate.bind(db, db), + from: function(src, opts) { + return PouchDB.replicate.bind(db)(src, db, opts); + }, + sync: PouchDB.sync.bind(db, db) }, - destroy: qify(db.destroy.bind(db)) + destroy: qify(PouchDB.destroy.bind(db, db)) }; } };