17 lines
395 B
TypeScript
17 lines
395 B
TypeScript
import { Injectable } from '@angular/core';
|
|
import { HttpClient } from '@angular/common/http';
|
|
import { Lehrling } from '../lehrling';
|
|
|
|
@Injectable({
|
|
providedIn: 'root'
|
|
})
|
|
export class LehrlingService {
|
|
|
|
public $url = "http://localhost/bildungdb/api/apprentice_list.php";
|
|
constructor(private http: HttpClient) { }
|
|
|
|
getLehrlinge() {
|
|
return this.http.get<Lehrling[]>(this.$url);
|
|
}
|
|
}
|