git init v2

This commit is contained in:
2025-03-11 23:13:19 +01:00
parent 4d4c8a362a
commit abae328d8f
62 changed files with 3461 additions and 421 deletions

View File

@@ -0,0 +1,24 @@
import {Injectable} from '@angular/core';
import {HttpClient} from '@angular/common/http';
import {Customer} from '../models/customer';
import {Observable} from 'rxjs';
@Injectable({
providedIn: 'root',
})
export class CustomerService {
baseApi = "http://localhost:8080/api/customers";
// baseApi = "https://api.melvanveen.nl/api/customers";
constructor(private http: HttpClient) {
}
getCustomers(): Observable<Customer[]> {
return this.http.get<Customer[]>(`${this.baseApi}`);
}
addCustomer(customer: Customer): Observable<Customer> {
return this.http.post<Customer>(`${this.baseApi}`, customer);
}
}