Skip to content

Instantly share code, notes, and snippets.

@fellipeh
Created December 10, 2015 15:46
Show Gist options
  • Save fellipeh/fd96a2d87ebc31e93d2d to your computer and use it in GitHub Desktop.
Save fellipeh/fd96a2d87ebc31e93d2d to your computer and use it in GitHub Desktop.
$scope.parametros = ParametrosService.parametros;
$scope.Titulo = $scope.parametros.nome;
console.log('FiltroPageCtrl');
console.log($scope.parametros);
$scope.goURL = function (v_url) {
$window.location.href = v_url;
};
$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