UNPKG

@ng2-dynamic-forms/ui-foundation

Version:

Foundation UI package for ng2 Dynamic Forms

58 lines (45 loc) 2.44 kB
# ng2 Dynamic Forms Foundation UI ## Installation ``` npm install @ng2-dynamic-forms/ui-foundation -S ``` ## Import ```ts @NgModule({ imports: [ // ... ReactiveFormsModule, DynamicFormsCoreModule.forRoot(), DynamicFormsFoundationUIModule ] }) export class AppModule {} ``` ## Usage with **`DynamicFoundationFormComponent`**: ```ts <form [formGroup]="myFormGroup"> <dynamic-foundation-form [group]="myFormGroup" [model]="myFormModel"></dynamic-foundation-form> </form> ``` with **`DynamicFoundationFormControlComponent`**: ```ts <form [formGroup]="myFormGroup"> <dynamic-foundation-form-control *ngFor="let controlModel of myFormModel" [group]="myFormGroup" [model]="controlModel"></dynamic-foundation-form-control> </form> ``` ## Form Controls | Control | Model | Required Property | |:---------------------------------------------------------------------------------------------------: |:---------------------------: |:-----------------: | | **[Checkbox](http://foundation.zurb.com/sites/docs/forms.html#checkboxes-and-radio-buttons)** | `DynamicCheckboxModel` || | **[Checkbox Group](http://foundation.zurb.com/sites/docs/forms.html#checkboxes-and-radio-buttons)** | `DynamicCheckboxGroupModel` || | **[Input](http://foundation.zurb.com/sites/docs/forms.html#text-inputs)** | `DynamicInputModel` || | **[Radio Group](http://foundation.zurb.com/sites/docs/forms.html#checkboxes-and-radio-buttons)** | `DynamicRadioGroupModel` || | **[Select](http://foundation.zurb.com/sites/docs/forms.html#select-menus)** | `DynamicSelectModel` || | **[Switch](http://foundation.zurb.com/sites/docs/switch.html)** | `DynamicSwitchModel` || | **[TextArea](http://foundation.zurb.com/sites/docs/forms.html#text-areas)** | `DynamicTextAreaModel` || ## Sample [**Live Demo**](http://ng2-dynamic-forms.udos86.de/sample/index.aot.html#foundation-sample-form)