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:
@@ -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;
|
||||
});
|
||||
}
|
||||
|
||||
});
|
||||
Reference in New Issue
Block a user