【发布时间】:2016-02-25 04:06:44
【问题描述】:
我是角度和离子的新手。我试图设置 pouchdb-authentication 并收到此错误。我一定在某个地方犯了一些错误,但我无法弄清楚。请帮忙。在发布之前,我搜索了这个问题 2 天,但没有找到解决方案。
在 app.js 中:
var localDB = new PouchDB('testLogin');
var remoteDB = new PouchDB('http://localhost:5984/testLogin', {skipSetup: true});
在我的服务中:
remoteDB.signup(userName, password, {
metadata : {
email : email
}
}, function (err, response) {
if(err){
console.log("failure signup");
} else{
console.log("success signup");
}
});
TypeError: remoteDB.signup is not a function
at Object.self.signup (/localhost:8100/js/services/authentication.js:40:13)
at Scope.$scope.signup (/localhost:8100/js/controllers/authentication.js:41:16)
at fn (eval at <anonymous> (/localhost:8100/lib/ionic/js/ionic.bundle.js:26457:15), <anonymous>:4:320)
at callback (/localhost:8100/lib/ionic/js/ionic.bundle.js:36610:17)
at Scope.$eval (/localhost:8100/lib/ionic/js/ionic.bundle.js:29158:28)
【问题讨论】: