1
0
mirror of https://github.com/jcwimer/wrestlingApp synced 2026-04-12 16:25:41 +00:00

Moved api call to a service

This commit is contained in:
2016-03-02 13:34:41 +00:00
parent 459585fce2
commit 817e1fb0c1
6 changed files with 35 additions and 20 deletions

View File

@@ -0,0 +1,10 @@
app.controller("tournamentsController", function($scope, tournamentsService) {
$scope.message = "Test message in scope.";
tournamentsService.getAllTournaments().then(function(data) {
//this will execute when the
//AJAX call completes.
console.log(data);
$scope.allTournaments = data;
});
});