import { FormControlConfig } from "../services/form-control-config" ; import { DynamicFormBuildConfig } from "./interface/dynamic-form-build-config" ; import { Input , Directive } from "@angular/core" ; @ Directive ( ) export abstract class AbstractControlConfig { private _controlConfig : FormControlConfig ; private _dynamicFormBuildConfig : DynamicFormBuildConfig ; @ Input ( ) set controlConfig ( value ) { this . _controlConfig = value ; } get controlConfig ( ) { return this . _controlConfig ; } @ Input ( ) set dynamicFormBuildConfig ( value ) { this . _dynamicFormBuildConfig = value ; } get dynamicFormBuildConfig ( ) { return this . _dynamicFormBuildConfig ; } addItem ( ) { this . dynamicFormBuildConfig . controlsConfig [ this . controlConfig . config . controlConfigName ] [ "addItem" ] ( ) ; } removeItem ( index ) { this . dynamicFormBuildConfig . controlsConfig [ this . controlConfig . config . controlConfigName ] [ "removeItem" ] ( index ) ; } }