import { BaseModel } from './BaseModel'; import { FormGroup } from '@angular/forms'; import { FormGenerator } from './interfaces/FormGenerator'; import { Serializable } from './interfaces/Serializable'; export class Data extends BaseModel implements Serializable,FormGenerator{ public type:string; public url:string; fromJSONObject(item:any):Data{ this.type = item.type; this.url = item.url; return this; } buildForm():FormGroup{ let formGroup = this.formBuilder.group({ type: [this.type], url: [this.url] }); return formGroup; } }