Commit 54cd7e7a075dbef2222c5f20d99073035e1513a4

Authored by Eric Fernandez
1 parent 7a87a1c5ae
Exists in master and in 1 other branch validar_pve

servicios cliente

src/app/services/cliente.service.spec.ts
File was created 1 import { TestBed } from '@angular/core/testing';
2
3 import { ClienteService } from './cliente.service';
4
5 describe('ClienteService', () => {
6 beforeEach(() => TestBed.configureTestingModule({}));
7
8 it('should be created', () => {
9 const service: ClienteService = TestBed.get(ClienteService);
10 expect(service).toBeTruthy();
11 });
12 });
13
src/app/services/cliente.service.ts
File was created 1 import { Injectable } from '@angular/core';
2 import { HttpClient } from '@angular/common/http';
3 import { appSettings } from "src/etc/AppSettings";
4
5 @Injectable({
6 providedIn: 'root'
7 })
8 export class ClienteService {
9
10 private url = appSettings.apiClientes
11
12 constructor(private http: HttpClient) { }
13
14 getClienteById(id: number) {
15 return this.http.get(`${this.url}/get/${id}`);
16 }
17 }
18