]>
Commit | Line | Data |
---|---|---|
11fdf7f2 TL |
1 | import { HttpClient } from '@angular/common/http'; |
2 | import { Injectable } from '@angular/core'; | |
3 | ||
4 | import { ApiModule } from './api.module'; | |
5 | ||
6 | @Injectable({ | |
7 | providedIn: ApiModule | |
8 | }) | |
9 | export class HostService { | |
10 | constructor(private http: HttpClient) {} | |
11 | ||
12 | list() { | |
13 | return this.http | |
14 | .get('api/host') | |
15 | .toPromise() | |
16 | .then((resp: any) => { | |
17 | return resp; | |
18 | }); | |
19 | } | |
20 | } |