title: if i uncheck an element the check all in not getting unchecked
body: <p>I created a page in which it shows all the week days and dates. i.e monday to sunday. When i click check all, all the week days are getting checked and when I click on that again they are getting unchecked. But when I uncheck a weekday i.e monday or tuesday the check all box is still checked.
  here is my <code>html</code></p>
  
  <pre><code>&lt;div class=" row "&gt;    
      &lt;label class="custom-control custom-checkbox mb-2 mr-sm-2 mb-sm-0 warning"&gt;
      &lt;input type="checkbox" id="rem"  class="custom-control-input" [checked]="checkAll" (change)="onChangeCheckAll($event.target.checked)"&gt;
      &lt;span class="custom-control-indicator"&gt;&lt;/span&gt;
      &lt;span class="custom-control-description"&gt;&lt;/span&gt;
      Select All
      &lt;/label&gt;
  &lt;/div&gt;
  &lt;div class="row mgtop-5"&gt;
      &lt;div class="col-sm-4 "&gt;
          &lt;label class="custom-control custom-checkbox mb-2 mr-sm-2 mb-sm-0"&gt;
          &lt;input type="checkbox" id="rem"  class="custom-control-input"  [checked]="checkAllWeek" (change)="onChangeCheckWeek(Monday, $event.target.checked)"&gt;
          &lt;span class="custom-control-indicator"&gt;&lt;/span&gt;
          &lt;span class="custom-control-description"&gt;&lt;/span&gt;
          Monday
          &lt;/label&gt;
      &lt;/div&gt;
      &lt;div class="col-sm-4  "&gt;
          &lt;label class="custom-control custom-checkbox mb-2 mr-sm-2 mb-sm-0"&gt;
          &lt;input type="checkbox" id="rem"  class="custom-control-input" [checked]="checkAllWeek" (change)="onChangeCheckWeek(Tuesday, $event.target.checked)"  &gt;
          &lt;span class="custom-control-indicator"&gt;&lt;/span&gt;
          &lt;span class="custom-control-description"&gt;&lt;/span&gt;
          Tuesday
          &lt;/label&gt;
      &lt;/div&gt;
      &lt;div class="col-sm-4  "&gt;
          &lt;label class="custom-control custom-checkbox mb-2 mr-sm-2 mb-sm-0"&gt;
          &lt;input type="checkbox" id="rem"  class="custom-control-input" [checked]="checkAllWeek" (change)="onChangeCheckWeek(Wednesday, $event.target.checked)"  &gt;
          &lt;span class="custom-control-indicator"&gt;&lt;/span&gt;
          &lt;span class="custom-control-description"&gt;&lt;/span&gt;
          Wednesday
          &lt;/label&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="row mgtop-5"&gt;
      &lt;div class="col-sm-4  "&gt;
          &lt;label class="custom-control custom-checkbox mb-2 mr-sm-2 mb-sm-0"&gt;
          &lt;input type="checkbox" id="rem"  class="custom-control-input" [checked]="checkAllWeek" (change)="onChangeCheckWeek(Thursday, $event.target.checked)"  &gt;
          &lt;span class="custom-control-indicator"&gt;&lt;/span&gt;
          &lt;span class="custom-control-description"&gt;&lt;/span&gt;
          Thursday
          &lt;/label&gt;
      &lt;/div&gt;
      &lt;div class="col-sm-4  "&gt;
          &lt;label class="custom-control custom-checkbox mb-2 mr-sm-2 mb-sm-0"&gt;
          &lt;input type="checkbox" id="rem"  class="custom-control-input" [checked]="checkAllWeek" (change)="onChangeCheckWeek(Friday, $event.target.checked)"  &gt;
          &lt;span class="custom-control-indicator"&gt;&lt;/span&gt;
          &lt;span class="custom-control-description"&gt;&lt;/span&gt;
          Friday
          &lt;/label&gt;
      &lt;/div&gt;
      &lt;div class="col-sm-4 "&gt;
          &lt;label class="custom-control custom-checkbox mb-2 mr-sm-2 mb-sm-0"&gt;
          &lt;input type="checkbox" id="rem"  class="custom-control-input"  [checked]="checkAllWeek" (change)="onChangeCheckWeek(Saturday, $event.target.checked)" &gt;
          &lt;span class="custom-control-indicator"&gt;&lt;/span&gt;
          &lt;span class="custom-control-description"&gt;&lt;/span&gt;
          Saturday
          &lt;/label&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="row mgtop-5"&gt;
      &lt;div class="col-sm-4 "&gt;
          &lt;label class="custom-control custom-checkbox mb-2 mr-sm-2 mb-sm-0"&gt;
          &lt;input type="checkbox" id="rem"  class="custom-control-input"  [checked]="checkAllWeek" (change)="onChangeCheckWeek(Sunday , $event.target.checked)" &gt;
          &lt;span class="custom-control-indicator"&gt;&lt;/span&gt;
          &lt;span class="custom-control-description"&gt;&lt;/span&gt;
          Sunday
          &lt;/label&gt;
      &lt;/div&gt;
      &lt;div class="col-sm-8 mgtop-5"&gt;&lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>here is the JavaSCript</p>
  
  <pre><code>// check for particular weekday
  onChangeCheckWeek(week: any, isChecked: boolean) {
      if (isChecked) {
        this.checkAll = false;
      } else {
        this.checkAll = false;
      }
    }
  
  
  
  // check all weekdays
  onChangeCheckAll(isChecked: boolean) {
      if (isChecked) {
        this.checkAllWeek = true;
  
      } else {
        this.checkAll = false;
        this.checkAllWeek = false;
  
      }
    }
  </code></pre>