Skip to content

Instantly share code, notes, and snippets.

@anghelalexandra
Last active June 10, 2017 19:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anghelalexandra/2c86fe3b7ec35d97a0eacb5631fc42d6 to your computer and use it in GitHub Desktop.
Save anghelalexandra/2c86fe3b7ec35d97a0eacb5631fc42d6 to your computer and use it in GitHub Desktop.
wp-pwa-sample-read-categories
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