JSPM

  • Created
  • Published
  • Downloads 13
  • Score
    100M100P100Q85832F
  • License ISC

Material UI package for ng2 Dynamic Forms

Package Exports

  • @ng2-dynamic-forms/ui-material

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@ng2-dynamic-forms/ui-material) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

ng2 Dynamic Forms Material UI

Installation

npm install @ng2-dynamic-forms/ui-material -S

Import

@NgModule({

    imports: [
        // ...
        ReactiveFormsModule,
        BrowserAnimationsModule,
        DynamicFormsCoreModule.forRoot(),
        DynamicFormsMaterialUIModule
    ]
})

export class AppModule {}

Usage

with DynamicMaterialFormComponent:

<form [formGroup]="myFormGroup">

    <dynamic-material-form [group]="myFormGroup"
                           [model]="myFormModel"></dynamic-material-form>
</form>

with DynamicMaterialFormControlComponent:

<form [formGroup]="myFormGroup">

    <dynamic-material-form-control *ngFor="let controlModel of myFormModel"
                                   [group]="myFormGroup"
                                   [model]="controlModel"></dynamic-material-form-control>
</form>

Form Controls

| Control | Model | Required Property | |:---------------------------------------------------------------------------------: |:---------------------------: |:-----------------: | | Autocomplete | DynamicInputModel | list | | Checkbox | DynamicCheckboxModel | – | | Checkbox Group | DynamicCheckboxGroupModel | – | | Datepicker | DynamicDatePickerModel | – | | Input | DynamicInputModel | – | | Radio Group | DynamicRadioGroupModel | – | | Select | DynamicSelectModel | – | | Slider | DynamicSliderModel | – | | SlideToggle | DynamicSwitchModel | – | | Textarea | DynamicTextAreaModel | – |

Sample

Live Demo