1(function () { 2 3 var catCtrl = function ($scope,$routeParams,$http) { 4 var categoria = $routeParams.cat; 5 $http.get('http://pidetuscitas.com/api/empresa/categorias/'+categoria).success(function(datos) { 6 $scope.listaCat = datos.mensaje; 7 $scope.categoriaTitulo = categoria; 8 9 //busco las localidades y las cuento 10 result = {}; 11 for(i = 0; i < datos.mensaje.length; ++i) { 12 if(!result[datos.mensaje[i].localidad]) 13 result[datos.mensaje[i].localidad] = 0; 14 ++result[datos.mensaje[i].localidad]; 15 } 16 $scope.localidadesDistintas= result; 17 18 19 //Paginacion 20 $scope.currentPage = 1; 21 $scope.pageSize = 10; 22 }); 23 24 //cojo la localidad seleccionada al hacer click 25 $scope.seleccionarLocalidad = function(loc) { 26 $scope.seleccionada = loc; 27 } 28 29 30 } 31 angular.module('controlApp').controller('categoriasCtrl', catCtrl); 32 33 //filtro para mostrar las localidades cuando hace click en la localidad 34 angular.module('controlApp').filter('porLocalidad', function(){ 35 return function(values, localidad) { 36 if(!localidad) { 37 return values; 38 } 39 // filter when we have a selected localidad 40 return values.filter(function(value){ 41 return value.localidad === localidad; 42 }) 43 } 44 }) 45 angular.module('controlApp').filter('startFrom', function() { 46 return function(input, start) { 47 start = +start; //parse to int 48 return input.slice(start); 49 } 50}); 51}());
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.