title: How to generate dynamically ngModel with *ngFor in Angular2?
body: <p>This has been been baffling me since two days , how to have a new <code>ngModel</code> for every new iteration within an <code>*ngFor</code> loop ? the idea is that i load a list of questions, within every question I have 2 propositions , here is the html</p>
  <pre><code> &lt;div *ngFor=&quot;#qt of listQuestion&quot;&gt;
  
  &lt;h3 class=&quot;uk-accordion-title&quot; &gt;{{qt.wordingQ}}&lt;/h3&gt;
  
   &lt;div class=&quot;uk-accordion-content&quot;&gt;
      
  &lt;input type=&quot;checkbox&quot;  id=&quot;0&quot; [(ngModel)]=&quot;selected&quot;  (Change)=&quot;cbChange($event)&quot;/&gt;
  
  &lt;label for=&quot;0&quot; class=&quot;inline-label&quot; &gt; &lt;b&gt;{{qt.lpo[0]}}&lt;/b&gt;&lt;/label&gt;&lt;br&gt;
      
  &lt;input type=&quot;checkbox&quot;  id=&quot;1&quot; [(ngModel)]=&quot;selected_1&quot; (Change)=&quot;cbChange_1($event)&quot;/&gt;
  
  &lt;label for=&quot;1&quot; class=&quot;inline-label&quot;&gt;&lt;b&gt;{{qt.lpo[1]}}&lt;/b&gt;&lt;/label&gt;&lt;br&gt;
      
      
                                     &lt;/div&gt;&lt;/div&gt;
  </code></pre>
  <p>This will work smoothly only if u have <strong>one question</strong> in the <code>listQuestion</code>, if there is more than a question , once I will check a <code>proposition</code> (e.g : <code>lpo[0]</code>) of the first Question all the other first propositions (<strong>first</strong> because the index of <code>lpo = 0</code>) of other questions will be selected
  Here is an image illustrating the issue:</p>
  <p><a href="https://i.stack.imgur.com/z5wFs.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/z5wFs.png" alt="enter image description here" /></a></p>
  <p>Any help please ?</p>