-
-
Save cliffmeyers/f19948b3ad760926d141 to your computer and use it in GitHub Desktop.
Simple AngularJS controller invoking a service.
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
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