30 lines
829 B
TypeScript
30 lines
829 B
TypeScript
import { Component, OnInit, Injectable } from '@angular/core';
|
|
import { DropZoneResp } from '../../models/dropzone';
|
|
import { ServiceApi } from '../../services/serviceApi';
|
|
import { ServiceComm } from '../../services/serviceComm';
|
|
|
|
@Component({
|
|
selector: 'app-list-of-dzs',
|
|
templateUrl: './list-of-dzs.component.html',
|
|
styleUrls: ['./list-of-dzs.component.css']
|
|
})
|
|
|
|
|
|
export class ListOfDzsComponent implements OnInit {
|
|
public listOfDropZones: Array<DropZoneResp> = new Array<DropZoneResp>();
|
|
|
|
constructor(private serviceApi: ServiceApi,
|
|
private serviceComm: ServiceComm) {
|
|
}
|
|
|
|
ngOnInit() {
|
|
this.serviceComm.updatedComponentTitle('List of DZs');
|
|
this.getListOfDropZones();
|
|
}
|
|
|
|
getListOfDropZones() {
|
|
this.serviceApi.getListOfDropZones()
|
|
.subscribe(data => this.listOfDropZones = data);
|
|
}
|
|
}
|