Commit e7f7c2656f9ca7c56ce67ab7f8440e4be7d53f20
1 parent
eff99c353a
Exists in
master
pequeño error
Showing
1 changed file
with
9 additions
and
7 deletions
Show diff stats
src/js/controller.js
... | ... | @@ -38,15 +38,17 @@ angular.module('focaModalProveedor') |
38 | 38 | }; |
39 | 39 | |
40 | 40 | $scope.search = function () { |
41 | - $scope.filteredProveedores = $filter('filter')( | |
42 | - $scope.proveedores, {$: $scope.filters} | |
43 | - ); | |
41 | + if($scope.primerBusqueda) { | |
42 | + $scope.filteredProveedores = $filter('filter')( | |
43 | + $scope.proveedores, {$: $scope.filters} | |
44 | + ); | |
44 | 45 | |
45 | - $scope.lastPage = Math.ceil( | |
46 | - $scope.filteredProveedores.length / $scope.numPerPage | |
47 | - ); | |
46 | + $scope.lastPage = Math.ceil( | |
47 | + $scope.filteredProveedores.length / $scope.numPerPage | |
48 | + ); | |
48 | 49 | |
49 | - $scope.resetPage(); | |
50 | + $scope.resetPage(); | |
51 | + } | |
50 | 52 | }; |
51 | 53 | |
52 | 54 | $scope.resetPage = function () { |