Commit 9338b7cb24e6349b2d2c29f428d506b2da9da1d8
1 parent
2125e40ad9
Exists in
master
Agrego servicio para recibir articulos por idlista
Showing
1 changed file
with
5 additions
and
2 deletions
Show diff stats
src/js/service.js
| 1 | angular.module('focaBusquedaProductos') | 1 | angular.module('focaBusquedaProductos') |
| 2 | .service('focaBusquedaProductosService', [ | 2 | .service('focaBusquedaProductosService', [ |
| 3 | '$http', | 3 | '$http', |
| 4 | 'API_ENDPOINT', | 4 | 'API_ENDPOINT', |
| 5 | function($http, API_ENDPOINT) { | 5 | function($http, API_ENDPOINT) { |
| 6 | return { | 6 | return { |
| 7 | getProductos: function() { | 7 | getProductos: function() { |
| 8 | return $http.get(API_ENDPOINT.URL + '/articulos'); | 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 | } |
| 12 | ]); | 15 | ]); |
| 13 | 16 |