Currently, I am working on a component that has an input of type array.
class FooComponent {
@Input() selectedItemIds:String[];
}
I want to utilize a map expression in binding within the parent component.
<app-foo-component [selectedItemIds]='items.map(i=>i.Id)'><app-foo-component>
However, I encountered an Angular error stating:
Bindings cannot contain assignments...
So, I am seeking a solution to this issue.
**Please note: While I know how to achieve this in the component class, I am exploring if there is a way to do it through the template as well. The provided code snippet is concise and aimed at illustrating my attempted approach.**