What is the best way to use two-way-binding (syntax-sugar) in Angular 2 with the safe navigation operator. I've tried the following.
<input [(ngModel)]="x?.y?.z">
But this is not supported.
Is there a way to use sth. like this?
You can split up- and downwards-binding like
<input [ngModel]="x?.y?.z" (ngModelChange)="x?.y?.z ? x.y.z = $event : null">
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With