You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
One of the first things I wanted to do in my {N} + Angular 2 app was add a simple form, but I found it difficult since <TextField [text]="foo"> only uses one-way data binding, and <TextField [(ngModel)]="foo"> doesn’t work.
Can we some up with some way to incorporate Angular 2’s two-way data binding, ideally with the same [(ngModel)] syntax?
Thanks.
The text was updated successfully, but these errors were encountered:
[(ngModel)]="foo" desugars to [ngModel]="foo" (ngModelChange)="foo = $event", and we don't provide *Change events for most properties.
We could make this work for NativeScript dependency properties by attaching property change events automatically in the renderer whenever we get a fooChange event attach request.
This one needs more research, as I'm afraid we could easily end up with circular change events or zone exceptions (aka "causing a change during change detection").
One of the first things I wanted to do in my {N} + Angular 2 app was add a simple form, but I found it difficult since
<TextField [text]="foo">
only uses one-way data binding, and<TextField [(ngModel)]="foo">
doesn’t work.Can we some up with some way to incorporate Angular 2’s two-way data binding, ideally with the same
[(ngModel)]
syntax?Thanks.
The text was updated successfully, but these errors were encountered: