17 lines
503 B
TypeScript
17 lines
503 B
TypeScript
import { Injectable } from '@angular/core';
|
|
import { HttpClient, HttpHeaders } from '@angular/common/http';
|
|
import { DropZoneResp } from '../models/dropzone';
|
|
|
|
@Injectable()
|
|
export class ServiceApi {
|
|
constructor(private http: HttpClient) { }
|
|
|
|
public getListOfDropZones() {
|
|
const headers = new HttpHeaders({
|
|
'Access-Control-Allow-Origin': 'https://localhost:44344',
|
|
});
|
|
|
|
return this.http.get<Array<DropZoneResp>>('https://localhost:44344/api/DropZone', { headers: headers });
|
|
}
|
|
}
|