Reputation: 3689
Is there a way to bind a field in a component as input and output ?
i.e.
<my-component [(innerComponentField)]="outerComponentField"></my-component>
Thanks for your help.
Upvotes: 1
Views: 452
Reputation: 657476
For []
the component needs a matching @Input()
For ()
it needs a matching @Output()
.
There is no way to do both with just an @Input()
The combination [(innerComponentFields)]
requires
@Input() dynamic innerComponentField;
@Output() EventEmitter innerComponentFieldChange = new EventEmitter();
Upvotes: 2