producto.service.ts 395 Bytes
import { Injectable } from '@angular/core';
import { HttpClient } from '@angular/common/http';
import { Observable } from 'rxjs';
import { appSettings } from 'src/etc/AppSettings';

@Injectable({
  providedIn: 'root'
})
export class ProductoService {

  constructor(private http: HttpClient) { }

  getAll(): Observable<any> {
    return this.http.get(`${appSettings.apiUrl}/articulos`);
  }

}