I am using latest Angular with AJSF version 0.8.0. I have created a Yes/No toggle component and register the widget. I can see the component is rendered but when I click on a toggle button, nothing happens. So my guess is somehow we need to tell the ajsf this is the value coming from the new component, but not sure how that can be configured.
This is what I have done:
export class ToggelWidgetComponent {
@Input() value: boolean = false;
@Output() onChange = new EventEmitter<boolean>();
handleChange(value: boolean) { <some codes here>}
}
and this is a simple html that created:
<input type="checkbox" name="something">
and then in the main component where I have ajsf I register it like:
ngOnInit() {
this.widgetLibraryService.registerWidget('toggle-widget', ToggelWidgetComponent);}
I can see the new widget is replaced in the form but when I click the checkbox, no value is sent to the ajsf form. I couldn't find any useful detail in any document and wonder if anyone has done this before.