Commit 2604553c68513510e36c408fa22a2a55f6016dcb

Authored by Nicolás Guarnieri
Exists in master

Merge remote-tracking branch 'upstream/master'

src/js/controller.js
... ... @@ -4,9 +4,10 @@ angular.module('focaBusquedaProductos')
4 4 '$filter',
5 5 '$scope',
6 6 '$uibModalInstance',
  7 + 'idLista',
7 8 'focaBusquedaProductosService',
8   - function($filter, $scope, $uibModalInstance, focaBusquedaProductosService) {
9   - focaBusquedaProductosService.getProductos().then(
  9 + function($filter, $scope, $uibModalInstance, idLista, focaBusquedaProductosService) {
  10 + focaBusquedaProductosService.getProductosByIdLista(idLista).then(
10 11 function(res) {
11 12 $scope.productos = res.data;
12 13 $scope.search();
1 1 angular.module('focaBusquedaProductos')
2 2 .service('focaBusquedaProductosService', [
3   - '$http',
4   - 'API_ENDPOINT',
  3 + '$http',
  4 + 'API_ENDPOINT',
5 5 function($http, API_ENDPOINT) {
6 6 return {
7 7 getProductos: function() {
8 8 return $http.get(API_ENDPOINT.URL + '/articulos');
  9 + },
  10 + getProductosByIdLista: function(id) {
  11 + return $http.get(API_ENDPOINT.URL + '/articulos/lista/' + id);
9 12 }
10 13 };
11 14 }
src/views/modal-busqueda-productos.html
... ... @@ -56,7 +56,7 @@
56 56 <span class="sr-only">Anterior</span>
57 57 </a>
58 58 </li>
59   - <li
  59 + <li
60 60 class="page-item"
61 61 ng-repeat="pagina in paginas"
62 62 ng-class="{'active': pagina == currentPage}"