I need to get all the documents from PouchDB database and store them in $scope variable (AngularJS). Can anyone tell me how to get the 'doc' from the callback function?
db.allDocs({include_docs: true, descending: true}, function(err, doc) {
$scope.info = doc;
});
Outside of this code, $scope.info is undefined, the doc object is not stored in this variable