daily pastebin goal
63%
SHARE
TWEET

Untitled

a guest Jan 22nd, 2019 51 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. getAllCategories() {
  2.     try {
  3.       let categories = []
  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.         return categories;
  12.       });
  13.     } catch (err) {
  14.       console.log(err);
  15.       return null;
  16.     }
  17.   }
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