Skip to content

Instantly share code, notes, and snippets.

@wcadap
Created January 2, 2015 04:58
Show Gist options
  • Save wcadap/94805e8a2dc64e9199ad to your computer and use it in GitHub Desktop.
Save wcadap/94805e8a2dc64e9199ad to your computer and use it in GitHub Desktop.
contactApp.controller('contactController',
['$scope', 'contactDataService', '$location',
function categoryController($scope, contactDataService) {
$scope.contacts = [];
loadContactData();
function loadContactData() {
contactDataService.getContacts()
.then(function () {
$scope.contacts = contactDataService.contacts;
},
function () {
//Error goes here...
})
.then(function () {
$scope.isBusy = false;
});
};
}]);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment