title: How to auto unchecked all checkbox if click another checkbox in angular2?
body: <p>I am angular2 beginner. I am creates a section hide and show using one common checkbox. On checked this checkbox show another checkbox list and unchecked hide the these checkbox list. </p>
  
  <p>But problem is if I am checked checkbox list and then hide the this section and again checked so show already checked but I am try to unchecked all. If list is checked so on click common checkbox so this list is unchecked. </p>
  
  <p>html code this :- </p>
  
  <pre><code>&lt;form [formGroup] = "group"&gt;
  &lt;p&gt;
    &lt;md-checkbox (change)="form()" [(ngModel)]="good" [ngModelOptions]="{standalone: true}" &gt;Show/Hide and cheecked and unchecked&lt;/md-checkbox&gt;
  &lt;/p&gt;
  
  &lt;div *ngIf="*ngIf="isVisible"" formArrayName="check"&gt;
    &lt;span  *ngFor="let test of tests; let i = index" formGroupName="{{i}}"&gt;
       &lt;md-checkbox formControlName="{{test.value}}" [checked] = "test.status" &gt;{{test.display}}&lt;/md-checkbox&gt;
     &lt;/span&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p></p>
  
  <p>component.ts</p>
  
  <pre><code>tests:any = [
   { value: '1', display: 'One', status: 'false'},
   { value: '2', display: 'Two', status: 'false'},
   { value: '3', display: 'Three', status: 'false'},
   { value: '4', display: 'Four', status: 'false'}
  ]
  
  isVisible:any;
  good: string;
  form() {
    let all: FormArray = new FormArray([]);
    for (let i = 0; i &lt; this.tests.length; i++) {
      let fg = new FormGroup({});
      fg.addControl((this.tests[i].value).status, new FormControl(false))
      all.push(fg)
    }
  
    if(!this.isVisible) {
     this.group.get('tests').enable();
    } else {
     this.group.get('tests').disable();
    }
    this.isVisible = this.good;
  }
  </code></pre>
  
  <p>Please tell us how to done?</p>