producto.service.ts
409 Bytes
import { Injectable } from '@angular/core';
import { HttpClient } from '@angular/common/http';
import { Observable } from 'rxjs';
import { environment } from 'src/environments/environment.prod';
@Injectable({
providedIn: 'root'
})
export class ProductoService {
constructor(private http: HttpClient) { }
getAll(): Observable<any> {
return this.http.get(`${environment.apiUrl}/articulos`);
}
}