title: Indeterminate in checkbox with formControl
body: <p>I have been trying to implement "select all" option with Mat-Select using Mat-checkbox to get the indeterminate option along with reactive forms.
  And here is the reference link : <a href="https://stackblitz.com/edit/angular-material-select-all?file=src%2Fapp%2Fselect-check-all.component.ts" rel="nofollow noreferrer">https://stackblitz.com/edit/angular-material-select-all?file=src%2Fapp%2Fselect-check-all.component.ts</a> </p>
  
  <p>In ts:</p>
  
  <pre><code> @Input() model: NgModel;
    @Input() values = [];
  
    isIndeterminate(): boolean {
      return this.model.value &amp;&amp; this.values.length &amp;&amp; this.model.value.length
        &amp;&amp; this.model.value.length &lt; this.values.length;
    }
  </code></pre>
  
  <p>And html:</p>
  
  <pre><code>&lt;mat-checkbox class="mat-option"
                  [indeterminate]="isIndeterminate()"
                  [checked]="isChecked()"
                  (click)="$event.stopPropagation()"
                  (change)="toggleSelection($event)"&gt;
        {{text}}
      &lt;/mat-checkbox&gt;
  </code></pre>
  
  <p>I have tried to do it using Reactive forms but I could not implement it as it started to through me errors related to value binding. And I want to implement it with Reactive forms itself.</p>