I have been experimenting with one-way and two-way binding to an input element using ngModel.
I wish to bind from view to model, in order to capture user input. I can accomplish this by creating a variable, for e.g. someVar, in a Component, and binding to it in the corresponding view template using [(ngModel)]="someVar".
I understand that this is syntactic sugar for [ngModel]="someVar" and (ngModelChange)="someVar=$event".
However, if i omit the model to view binding, namely [ngModel]="someVar", then the value of someVar remains undefined.
I cannot understand this behaviour, since omitting the view to model binding does not cause any problems.