Angular 2, set value of text inputs in form
<p>So I'm trying out some Angular 2 and I like it so far. But I need some help to navigate this new landscape.</p>

<p>I have a form to edit a users details and a list on the side with all my users. When I click on one of the users in the list I want to populate my edit-user-form with the user details (setEditForm(user)).</p>

<p>I've got it working and all. But I must say, it doesn't feel quite right to use ngControl and ngModel at the same time. But maybe it is...</p>

<p>Is this the correct way to do this or have I just got some luck in making it work?</p>

<pre><code>@Component({
  template: `
    &lt;form (ngSubmit)="editUser(f.value)" #f="ngForm"&gt;
      &lt;input ngControl="nameInp" [ngModel]="selectedUser.name" type="text"&gt;
      &lt;input ngControl="ageInp" [ngModel]="selectedUser.age" type="text"&gt;
      &lt;input ngControl="cityInp" [ngModel]="selectedUser.city" type="text"&gt;

      &lt;button type="submit"&gt;Save&lt;/button&gt;
    &lt;/form&gt;
)}

export class AdminComponent {
 selectedUser:UserModel;

 constructor() {
    this.selectedUser = new UserModel;
  }

  setEditForm(user:UserModel) {
    this.selectedUser = user;
  }

  editUser(form:any) {
    // Update DB with values
    console.log(form['nameInp']);
    console.log(form['ageInp']);
    console.log(form['cityInp']);
  }
}
</code></pre>