Skip to content

Instantly share code, notes, and snippets.

@cliffmeyers
Last active December 21, 2015 23:59
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 cliffmeyers/f19948b3ad760926d141 to your computer and use it in GitHub Desktop.
Save cliffmeyers/f19948b3ad760926d141 to your computer and use it in GitHub Desktop.
Simple AngularJS controller invoking a service.
function DonutController($scope, $http) {
// get the data
$http.get('/api/donut/listAll')
.then(function(response) {
// no fry cakes here
$scope.donuts = response.data.fritters;
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment