import { Serializable } from '../Serializable'; import { FormGroup, FormBuilder } from '@angular/forms'; export class ResearcherModel implements Serializable { public id: String; public name: String; public lastName: String; public uri: String; public email: String; fromJSONObject(item: any): ResearcherModel { this.id = item.id; this.name = item.name; this.email = item.email; this.uri = item.uri; return this; } buildForm(): FormGroup { const formGroup = new FormBuilder().group({ firstName: [this.name], lastName: [this.lastName] }); return formGroup; } }