Commit 4f59f2e7fc1e14cb9edc76f9ff949d35c0304326
1 parent
aaff6eba2e
Exists in
master
Agregado metodo para traer articulos con paginador.
Showing
1 changed file
with
8 additions
and
3 deletions
Show diff stats
src/app/services/producto.service.ts
| ... | ... | @@ -21,9 +21,14 @@ export class ProductoService { |
| 21 | 21 | return this.http.get(`${appSettings.apiUrl}/articulos/${id}`); |
| 22 | 22 | } |
| 23 | 23 | |
| 24 | - getAll(): Observable<any> { | |
| 24 | + getAll(page: number = 1): Observable<any> { | |
| 25 | 25 | |
| 26 | - return this.http.get(`${appSettings.apiUrl}/articulos`); | |
| 26 | + return this.http.get(`${appSettings.apiUrl}/articulos/`); | |
| 27 | + } | |
| 28 | + | |
| 29 | + getAllWithPaginator(page: number = 1): Observable<any> { | |
| 30 | + | |
| 31 | + return this.http.get(`${appSettings.apiUrl}/articulos/${page}`); | |
| 27 | 32 | } |
| 28 | 33 | |
| 29 | 34 | setProductos(producto: Producto) { |
| ... | ... | @@ -73,7 +78,7 @@ export class ProductoService { |
| 73 | 78 | return this.http.post(`${appSettings.apiUrl}/imagenes/guardar`, body); |
| 74 | 79 | } |
| 75 | 80 | |
| 76 | - deleteImage(body) : Observable<any>{ | |
| 81 | + deleteImage(body): Observable<any> { | |
| 77 | 82 | return this.http.post(`${appSettings.apiUrl}/imagen/borrar`, body); |
| 78 | 83 | } |
| 79 | 84 |