Update Vorgehensweise
parent
983bbf36ad
commit
9101d8faf8
@ -384,21 +384,21 @@ export const environment = {
|
||||
```
|
||||
Somit ergibt sich dann bei einem Aufruf mit einem HTTP-GET folgende Architektur der URL:
|
||||
```
|
||||
public exampleMethod(param: string): Promise<any> {
|
||||
public exampleMethod(param: string): Promise<any> {
|
||||
return this.client.get(environment.apiUrl + `urlToEndpoint/${param}/`).toPromise();
|
||||
}
|
||||
}
|
||||
```
|
||||
#### Beispiel aus dem DashboardService
|
||||
```
|
||||
public fetchDashboardInit(id: string): Promise<any> {
|
||||
public fetchDashboardInit(id: string): Promise<any> {
|
||||
return this.client.get(environment.apiUrl + `latest/dashboard/${id}/`).toPromise();
|
||||
}
|
||||
}
|
||||
```
|
||||
#### Beispiel aus dem MapService
|
||||
```
|
||||
private fetchBikePointGeoData(): Promise<any> {
|
||||
private fetchBikePointGeoData(): Promise<any> {
|
||||
return this.client.get(environment.apiUrl + 'latest/bikepoints/').toPromise();
|
||||
}
|
||||
}
|
||||
```
|
||||
Weitere Beispiele sind aus dem Sourcecode zu entnehmen.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user