Skip to content

Instantly share code, notes, and snippets.

@danilat
Created September 12, 2017 22:20
Show Gist options
  • Save danilat/ba2f91b24489369005451cfde9f12b00 to your computer and use it in GitHub Desktop.
Save danilat/ba2f91b24489369005451cfde9f12b00 to your computer and use it in GitHub Desktop.
// Al entrar a ver un concierto a través de su id
.controller('GigController', function($scope, $stateParams, $ionicLoading) {
gigService.retrieveAGig($stateParams.gig_id).then((gig) => {
$scope.gig = gig;
});
// Al realizar una búsqueda en el listado
$scope.search = function(){
if ($scope.searchTerm !== undefined) {
gigService.searchGigsGroupedByDay($scope.searchTerm).then(function(gigsByDay){
$scope.$apply(() => {
$scope.current_days = gigsByDay;
});
});
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment