title: Angular 5 checkbox checked status from data
body: <p>In my app data is coming from the server with nested arrays but there is no field for the check if the checkbox is checked or not so I added that field with foreach loop. This field has no effect even if it is true or false. My code is as follows.</p>
  
  <pre><code>this.testservice.getQuestions()
            .subscribe(
            resultArray =&gt; {
            this.questions = resultArray;
              this.questions.forEach(element =&gt; {
                element.Awnsers.forEach(elementA =&gt; {
                  elementA.isChekced = true;
                });
              });
  </code></pre>
  
  <p>the html code for input is</p>
  
  <pre><code>&lt;div *ngFor='let q of questions'&gt;
  &lt;b&gt;Question: &lt;/b&gt;
    {{q.Question}}&lt;br&gt;&lt;br&gt;
    &lt;div *ngFor='let a of q.Awnsers'&gt;
      &lt;label&gt;
        &lt;input type="checkbox"
               name="options"
               value="{{a.awnsers}}"
               (checked)="a.isChecked"
               (change)="testoption($event, a.Awnser)" /&gt;
               {{a.Awnser}}
    &lt;/label&gt;
    &lt;/div&gt;
   &lt;/div&gt;
  </code></pre>
  
  <p>Event the property isChecked is true for all the elements but they are not coming checked. Please help.</p>