I have a parent component with children inside:
<app-documents-mode-register [id_files]="getCheckedCheckboxesValues('id_file')"></app-documents-mode-register>
Where method getCheckedCheckboxesValues
is:
public getCheckedCheckboxesValues(property: string): number[] {
return this.checkboxes
.toArray()
.slice(1)
.filter((element: any) => element.value)
.map((element) => element.application[property]);
}
So I try to pass [id_files]
to children component, but I have read that not recommended way to pass function as Input parameter. How to improve it?
The app-documents-mode-register
component has onPush