mirror of
https://github.com/jcwimer/wrestlingApp
synced 2026-04-28 18:04:55 +00:00
Removed console.log on frontend tournamentsController, also fixed frontend syntax errors in tournamentsController and tournamentsService
This commit is contained in:
@@ -4,18 +4,15 @@ app.controller("tournamentsController", function($scope, tournamentsService) {
|
|||||||
tournamentsService.getAllTournaments().then(function(data) {
|
tournamentsService.getAllTournaments().then(function(data) {
|
||||||
//this will execute when the
|
//this will execute when the
|
||||||
//AJAX call completes.
|
//AJAX call completes.
|
||||||
console.log(data);
|
|
||||||
$scope.allTournaments = data;
|
$scope.allTournaments = data;
|
||||||
});
|
});
|
||||||
|
|
||||||
$scope.searchTournaments = function (){
|
$scope.searchTournaments = function (){
|
||||||
console.log("Tried search");
|
|
||||||
tournamentsService.searchTournaments($scope.searchTerms).then(function(data) {
|
tournamentsService.searchTournaments($scope.searchTerms).then(function(data) {
|
||||||
//this will execute when the
|
//this will execute when the
|
||||||
//AJAX call completes.
|
//AJAX call completes.
|
||||||
console.log(data);
|
|
||||||
$scope.allTournaments = data;
|
$scope.allTournaments = data;
|
||||||
});
|
});
|
||||||
}
|
};
|
||||||
|
|
||||||
});
|
});
|
||||||
@@ -22,7 +22,7 @@ app.factory('tournamentsService', function($http){
|
|||||||
}).then(function successCallback(response) {
|
}).then(function successCallback(response) {
|
||||||
// this callback will be called asynchronously
|
// this callback will be called asynchronously
|
||||||
// when the response is available
|
// when the response is available
|
||||||
return response.data
|
return response.data;
|
||||||
}, function errorCallback(response) {
|
}, function errorCallback(response) {
|
||||||
// called asynchronously if an error occurs
|
// called asynchronously if an error occurs
|
||||||
// or server returns response with an error status.
|
// or server returns response with an error status.
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.4 KiB |
Reference in New Issue
Block a user