title: Angular - Binding to string array at index
body: <p>I am new to Angular (5.x) and I am trying to bind the input value to string array (<code>rule.values</code>) at index (<code>i</code>) but when I change the input the array values do not change so I think binding fails. I appreciate any help or hint. Thank you</p>
  
  <pre><code>&lt;div *ngFor="let _ of rule.value; let i = index;" id="values"&gt;
    &lt;div class="row"&gt;
      &lt;div class="col-sm-3"&gt;
        Value #{{(i + 1).toString()}}
      &lt;/div&gt;
  
      &lt;div class="col-sm-6"&gt;
        &lt;input type="text" class="form-control" id="values{{i}}" [ngModel]="rule.value[i]" name="values{{i}}" required&gt;
      &lt;/div&gt;
  
      &lt;div class="col-sm-3"&gt;
        &lt;button type="button" class="btn btn-default" (click)="rule.value.splice(i, 1)"&gt;
          &lt;span class="glyphicon glyphicon-minus" aria-hidden="true"&gt;&lt;/span&gt;
        &lt;/button&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>