24 lines
758 B
TypeScript
24 lines
758 B
TypeScript
import { BaseModel } from '../BaseModel';
|
|
import { FormGroup } from '@angular/forms';
|
|
import { FormGenerator } from '../interfaces/FormGenerator';
|
|
import { Serializable } from '../interfaces/Serializable';
|
|
|
|
export class ViewStyle extends BaseModel implements Serializable<ViewStyle>,FormGenerator<FormGroup>{
|
|
public cssClass:string;
|
|
public renderStyle:string;
|
|
|
|
fromJSONObject(item:any):ViewStyle{
|
|
this.cssClass = item.cssClass;
|
|
this.renderStyle = item.renderStyle;
|
|
return this;
|
|
}
|
|
|
|
buildForm():FormGroup{
|
|
let formGroup = this.formBuilder.group({
|
|
cssClass: [this.cssClass],
|
|
renderStyle: [this.renderStyle]
|
|
|
|
});
|
|
return formGroup;
|
|
}
|
|
} |