1
0
mirror of https://github.com/jcwimer/wrestlingApp synced 2026-04-05 06:07:20 +00:00

Added a mock layout and an api call for angular

This commit is contained in:
2016-03-01 16:15:19 +00:00
parent 4a90165514
commit c03402bcdb
4 changed files with 102 additions and 65 deletions

View File

@@ -0,0 +1,17 @@
app.controller("homeController", function($scope, $http) {
$scope.message = "Test message in scope.";
$http({
method: 'GET',
url: '/api/tournaments/'
}).then(function successCallback(response) {
// this callback will be called asynchronously
// when the response is available
$scope.query = response.data;
}, function errorCallback(response) {
// called asynchronously if an error occurs
// or server returns response with an error status.
$scope.query = "Nothing there";
});
});