NG Dynamic Forms Material UI
Installation
npm i @ng-dynamic-forms/ui-material -S
Import
@NgModule({
imports: [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
Custom UI Events
<form [formGroup]="myFormGroup">
<dynamic-material-form [group]="myFormGroup"
[model]="myFormModel"
(matEvent)="onMatEvent($event)"></dynamic-material-form>
</form>
Resources
14.0.0
Features
- Migration to Angular 12
- Migration to TypeScript strict mode
- Removes non-critical circular dependency
- Migration to
karma-coverage
from karma-coverage-instanbul-reporter
Breaking Changes
angular2-text-mask
has finally been replaced with ngx-mask
This means from now text masking is only available to UI components that use a built-in
mask feature or do not already apply a custom ControlValueAccessor
like Material.
In order to integrate ngx-mask
properly, a maskConfig
property has been added to DynamicInputModel
while the type of mask
has been
narrowed to string
.
mask?: string;
maskConfig?: Partial<IConfig>;