Created
December 10, 2015 12:21
-
-
Save fellipeh/a107e9e254d9b52306fb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MyAppMobile.angular.controller('FiltroPageController', ['$scope', '$http', '$window', 'InitService', | |
'ParametrosService', 'FiltroService', | |
function ($scope, $http, $window, InitService, ParametrosService, FiltroService) { | |
'use strict'; | |
$scope.parametros = ParametrosService.parametros; | |
$scope.Titulo = $scope.parametros.nome; | |
$scope.onItemClicked = function (produto) { | |
FiltroService.produtoClicked(produto); | |
}; | |
InitService.addEventListener('ready', function () { | |
console.log('Carregando os detalhes...'); | |
$scope.detalhes_loaded = false; | |
FiltroService.getDestaques($scope.parametros.valor).then(function (result) { | |
console.log(result); | |
$scope.detalhes = result.data; | |
$scope.detalhes_loaded = true; | |
}, function (err) { | |
console.error(err); | |
}); | |
}); | |
}]); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment