1
0
mirror of https://github.com/jcwimer/wrestlingApp synced 2026-04-10 07:48:29 +00:00

Added a search to both api and frontend

This commit is contained in:
2016-03-02 14:08:14 +00:00
parent 817e1fb0c1
commit 9bd36d2cb0
4 changed files with 46 additions and 10 deletions

View File

@@ -1,10 +1,21 @@
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;
});
});
$scope.searchTournaments = function (){
console.log("Tried search");
tournamentsService.searchTournaments($scope.searchTerms).then(function(data) {
//this will execute when the
//AJAX call completes.
console.log(data);
$scope.allTournaments = data;
});
}
});