angular-dynamic-forms-lite
Version:
Efficient dynamic and customizable Angular 7+ forms.
18 lines (17 loc) • 908 B
TypeScript
import { FormFieldSetting } from "../form-settings/form-field-setting";
import { AbstractControl } from "@angular/forms";
import { ComponentRef } from "@angular/core";
import { FormFieldComponent } from "../form-field/form-field-component";
import { FormFieldGroupComponent } from "../form-field/group/form-field-group-component";
import { FormFieldArrayComponent } from "../form-field/array/form-field-array-component";
import { FormFieldSettings } from "../form-settings/form-field-settings";
export interface FormContext<M, H extends AbstractControl = AbstractControl> {
initialValue: any;
formControl: H;
setting: FormFieldSetting<M>;
settings: FormFieldSettings;
componentRef: ComponentRef<FormFieldComponent | FormFieldGroupComponent | FormFieldArrayComponent>;
children: FormContext<any, AbstractControl>[] | {
[id: string]: FormContext<any, AbstractControl>;
};
}