Skip to content

Instantly share code, notes, and snippets.

@vitaliy-bobrov
Created February 10, 2015 15:45
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 vitaliy-bobrov/774da5ff5b680610db0b to your computer and use it in GitHub Desktop.
Save vitaliy-bobrov/774da5ff5b680610db0b to your computer and use it in GitHub Desktop.
Tutorial App part 4 - CategoriesCtrl
.controller('CategoriesCtrl', ['$scope', '$ionicLoading', 'Categories', function($scope, $ionicLoading, Categories) {
$ionicLoading.show();
Categories.all().then(function(data) {
$ionicLoading.hide();
$scope.categories = data;
}, function(error) {
console.log(error);
});
}])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment