Last active
June 10, 2017 19:24
-
-
Save anghelalexandra/2c86fe3b7ec35d97a0eacb5631fc42d6 to your computer and use it in GitHub Desktop.
wp-pwa-sample-read-categories
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Categories { | |
constructor($log, AppticlesAPI) { | |
const populateCategories = (result) => { | |
this.categories = result; | |
}; | |
AppticlesAPI.findCategories({hide_empty: 1}) | |
.then(populateCategories) | |
.catch($log.error); | |
} | |
} | |
Categories.$inject = ['$log', 'AppticlesAPI']; | |
angular.module('appticles.categories') | |
.controller('CategoriesController', Categories); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment