Add the view to show the list of DZs
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { HttpClient } from '@angular/common/http';
|
||||
import { HttpClient, HttpHeaders } from '@angular/common/http';
|
||||
import { DropZoneResp } from '../models/dropzone';
|
||||
|
||||
@Injectable()
|
||||
@@ -7,6 +7,12 @@ export class ServiceApi {
|
||||
constructor(private http: HttpClient) { }
|
||||
|
||||
public getListOfDropZones() {
|
||||
return this.http.get<DropZoneResp>('http://localhost:1234/api/DropZone');
|
||||
const httpOptions = {
|
||||
headers: new HttpHeaders({
|
||||
'Access-Control-Allow-Origin': 'https://localhost:44344',
|
||||
})
|
||||
};
|
||||
|
||||
return this.http.get<Array<DropZoneResp>>('https://localhost:44344/api/DropZone', httpOptions);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user