daily pastebin goal
37%
SHARE
TWEET

Untitled

a guest Jan 22nd, 2019 52 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. getAllCategories() {
  2.     let categories = [];
  3.  
  4.     this.localDataService.categories.allDocs({
  5.         include_docs: true,
  6.         attachments: true
  7.     }).then((result) => {
  8.         for (let i = 0; i < result.rows.length; i++) {
  9.             categories.push(result.rows[i].doc);
  10.         }
  11.     }).catch(err => console.error(err));
  12.  
  13.     return categories.length !== 0 ? categories : null;
  14.   }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top