简体   繁体   English

Angular PouchDb和Auth示例

[英]Angular PouchDb and Auth Example

I tried great example angularjs todo app: https://github.com/danielzen/todo-ng-pouchdb 我尝试了很好的例子angularjs todo app: https//github.com/danielzen/todo-ng-pouchdb

and now I'm trying use it with some authentication plugin, but without success ( https://github.com/nolanlawson/pouchdb-authentication ). 现在我正在尝试使用一些身份验证插件,但没有成功( https://github.com/nolanlawson/pouchdb-authentication )。 Todo app use some old angular-pouchdb lib. Todo应用程序使用一些旧的angular-pouchdb lib。

Please do you have any tip to example where is used angular, pouchdb and auth plugin to login, signup to couchdb. 请问您有什么提示示例使用angular,pouchdb和auth插件登录,注册到couchdb。

My problems with log into CouchDb were because of wrong auth params, I didn't wrap login values into array with key auth . 我登录CouchDb的问题是因为auth params错误,我没有使用密钥auth将登录值包装到数组中。 So just example of correct call to server: 所以只是正确调用服务器的示例:

$scope.sync = $scope.tasks.$db.replicate.sync('http://www.server.info:5984/' + dbName, 
{live: true, "auth": {username:"john", password:"secret"}})
   .on('error', function (err) {

   });

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM