I have an Angular UI where clicking an edit button transforms the member name heading into a form where you can edit and update the name. I want the form to be pre-filled with the existing name.
However, the problem occurs with the value="{{member.name}}"
line in the code snippet below. The form simply appears blank. Why?
Using placeholder="{{member.name}}"
sets the value correctly, but placeholder isn't the behavior I want.
<h4 *ngIf="!editMode">{{member.name}}</h4>
<form *ngIf="editMode" #f="ngForm" (ngSubmit)="onEdit(f)">
<input type="text" value="{{member.name}}" ngModel name="name">
<button type="submit">Update</button>
</form>