-
Notifications
You must be signed in to change notification settings - Fork 2
Designers
zehavibarak edited this page Dec 25, 2023
·
3 revisions
BizDoc managed components can be have custom designers, making it manageable from the architecture tool.
Choose one of two ways:
- Apply designer to specific component properties.
- Apply designer to the component type.
public class MyCustomers: TypeBase {
[Designer(), Display(Name = "Starting year", Description = "Filter customers by starting year")]
public short? StartingYear { get; set; }
}[Designer(Template = "app-customers-designer")]
public class MyCustomers: TypeBase {
public short? StartingYear { get; set; }
public short? EndingYear { get; set; }
}In angular:
@Component({template: `Designer here!`})
@BizDoc({selector: 'app-customers-designer'})
export class CustomersDesignerComponent implements ElementDesignerComponent {
mode: DesignMode;
readonly form = new FormGroup({
startingYear: 0,
endingYear: 2024
});
}The selector has the same name as the template defined in class.
Inject DesignerRef to access the configuration set.
In app.module, add component to BizDocModule.
Moding Ltd.