-
-
Save MrCube42/7c5a205209c5c66d2c7384968da5cc6d to your computer and use it in GitHub Desktop.
Angular-Service, der über eine REST API die interessanten Bekannten in der Nähe, zur Darstellung in der Client-App, zurückliefert.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export class CompanionsService { | |
constructor(private http: HttpClient) {} | |
public getAll(): Observable<Companion[]> { | |
const url = `${BASE_URL}/companions`; | |
return this.http.get<Companion[]>(url); | |
} | |
// ... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment