When I use ngModel to bind variables in two elements in a single component, then from component to DOM only updates the second variable as the value for both elements.
For example:
<input [(ngModel)]=“userID” />
<input [(ngModel)]=“password” />
On the component side:
userID = “username”;
password = “password”;
In this case both the input field displays “password”. Why isn’t the userID field in the input displaying “username”.