1

I want to make pagination with pouchdb.

See code to get all data

function getAllData() {
     if (!_data) {
         return $q.when(_db.allDocs({ include_docs: true})) 
             .then(function(docs) {
                 _data = docs.rows.map(function(row) {
                     return row.doc;
                 });
             });
     } else {
         return $q.when(_data);
     }
 };
s.alem
  • 12,579
  • 9
  • 44
  • 72

0 Answers0