I have a component with input of type array
class FooComponent {
@Input() selectedItemIds:String[];
}
and I would like to use map expression in binding in the parent component
<app-foo-component [selectedItemIds]='items.map(i=>i.Id)'><app-foo-component>
and I get the nice angular error
Bindings cannot contain assignments...
so what is the solution ?
**Note: I know how to do it in component class.I want to know if it is somehow possible via template and the code is very brief, I just wanted to show what I was trying to do **
*.tsfile before you try to pass them to the component?*ngIfon<app-foo-component...to force it to run only when your array is ready.