import { ApplicationConfig } from '@angular/core';
import { provideNgDynamicJsonForm } from 'ng-dynamic-json-form';
export const appConfig: ApplicationConfig = {
...
providers: [
provideNgDynamicJsonForm({
customValidators: {...},
uiComponents: {...},
labelComponent: ...,
loadingComponent: ...,
errorComponent: ...,
hideErrorsFor: [...],
}),
]
}
See Provide custom validators globally
See UI components
See Overwrite all the loadings
Hide the error message section of the control where its type
is included in the list.
provideNgDynamicJsonForm({
...
hideErrorsForTypes: ["text", "checkbox", "customTypeToHide"],
}),
Show errors when the control is touched
. Default is true.
The configuration to generate form.
export interface FormControlConfig {
formControlName: string;
conditions?: Conditions;
children?: FormControlConfig[];
description?: string;
props?: any;
hidden?: boolean;
label?: string;
layout?: FormLayout;
inputMask?: FactoryArg;
options?: FormControlOptions;
readonly?: boolean;
type?: FormControlType;
value?: any;
validators?: ValidatorConfig[];
}
The form control name of this control. Should be unique.
_
automatically..
and ,
characters will be removed automatically.See Conditions.
An array of FormControlConfig
, use this to create FormGroup for this control.
Description for this input.
Use to bind properties and attributes to the target component or the input element.
Don't render this input in the DOM.
The label of this input.
See Layout.
See Input Mask.
See Options.
A readonly
class will be added to the host element. Can use to disable user to interact with this input.
See Input Types.
Default value of this control.
See Validators.