title: How to select all checkbox in angular 2?
body: <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div class="col-2"&gt;
    &lt;label class="myButton btn btn-default"&gt;&lt;input  type="checkbox" [checked]="selectAllCheckbox" (click)="selectAll()"&gt; Select All&lt;/label&gt;
  &lt;/div&gt;
  &lt;div class="row"&gt;
    &lt;div class="col-2" *ngFor="let user of Users; let idx = index"&gt;
      &lt;label&gt;&lt;input [checked]="item._selected" (click)="updatedUserList(user, $event)" type="checkbox"&gt; {{user}}&lt;/label&gt;
    &lt;/div&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>users = ["users1", "users2", "users3"]</p>