title: How to implement select all in mat-checkbox angular 5
body: <p>Here is my html template</p>
  
  <pre><code>&lt;mat-card&gt;
      &lt;mat-card-content&gt;
          &lt;h2 class="example-h2"&gt;Select Employee&lt;/h2&gt;    
          &lt;section class="example-section"&gt;
              &lt;mat-checkbox  [(ngModel)]="checked"&gt;Select All&lt;/mat-checkbox&gt;
          &lt;/section&gt;   
          &lt;section class="example-section" *ngFor="let r of emp"&gt;
              &lt;mat-checkbox class="example-margin" [(ngModel)]="checked"&gt;{{r.name}}&lt;/mat-checkbox&gt;
          &lt;/section&gt; 
      &lt;/mat-card-content&gt;
  &lt;/mat-card&gt; 
  </code></pre>
  
  <p>This is code is not working properly, if I click on select all, its selecting all the check boxes, if I select on individual check box, its also selecting
  all the items.</p>
  
  <p>Please help.</p>