title: Assign initial value for dynamically generated ngModel Angular (2/4)
body: <p>I've worked out that I can create dynamic ngModel variables using <a href="https://stackoverflow.com/questions/41199285/angular-2-dynamic-variables-in-ngmodel">this method</a>. This works great because I'm trying to generate a bunch of text inputs based on a list and then put an ngModel variable on them. The problem I'm running into is I want to assign an initial value to the textbox so it displays this value (as well as being the value for the ngModel) and then obviously the user can type in the box, changing the value of the ngModel variable. </p>
  
  <p>I can't work out a way to do this though. If I set a value for the input it's simply cleared. It also needs to be done with ngModel rather than 2 way data binding (the {{}} method) because I need to be able to reference the variable later.</p>
  
  <p>Below is my attempt to get it to work. You can assume "items" is a list of string values.</p>
  
  <pre><code>&lt;ul&gt;
   &lt;li *ngFor = "let item of items"&gt;
    &lt;input type = "text" [(ngModel)] = "input[item]" value = '{{item}}'&gt;
   &lt;/li&gt;
  &lt;/ul&gt; 
  </code></pre>
  
  <p>I'm also very new to Angular and web dev in general so I could just be missing something very obvious and if that's the case I apologise. Regardless I'd really appreciate any help. </p>