title: How to set the name tag in a ngFor* loop dynamically?
body: <p>I'm trying to set the name tag dynamically with values from a <code>ngFor</code> loop. It's no problem to assign a value to the id tag, but for the name tag it does not work.</p>
  
  <pre><code>&lt;table class="compactTable"&gt;
    &lt;tr *ngFor="let s of ps.State; let i = index;" &gt;
      &lt;td class="alignRight" width="15%"&gt;
          &lt;input type="text" id ="{{i}}" (change)="check($event)" name ="{{i}}" [(ngModel)]="s.ZBez"&gt; 
      &lt;/td&gt;
    &lt;/tr&gt;
  &lt;/table&gt;
  </code></pre>
  
  <p>The <code>$event</code>, which I pass <code>onChange</code> to the <code>check()</code> function has an <code>id</code> equal to <code>i</code>, but <code>name</code> is always an empty string. Why are they different and how can I set the <code>name</code> dynamically?</p>