Skip to main content
Version: 8.x.x

Decorators

ngx-form-object exposes three decorators: Attribute(), BelongsTo(), and HasMany(). You can use one of these decorators to specify what kind of form controls should FormObjectbuilder create for different model properties.

Attribute()#

ExtendedFormControls will be created for model properties decorated with the Attribute() decorator.

BelongsTo()#

ExtendedFormControls will be created for model properties decorated with the BelongsTo() decorator.

HasMany()#

Empty ExtendedFormArray will be created for model properties decorated with the HasMany() decorator.

You can override default control types in FormObject.