title: How to uncheck checkboxes on a button click?
body: <p>I have the following 3 input checkboxes, after checking the checkboxes, I would like to clear all the checked items after the &quot;Clear Checkbox&quot; button is clicked. I attempted the following but it doesn't work.</p>
  <p><a href="https://stackblitz.com/edit/angular-ivy-tz8dac?file=src%2Fapp%2Fhello.component.ts" rel="nofollow noreferrer"><strong>Stackblitz working Example</strong></a></p>
  <p><strong>app.component.html</strong></p>
  <pre><code>&lt;ul *ngFor=&quot;let d of data&quot;&gt;
    &lt;li&gt;
      &lt;input id=&quot;checkbox&quot; type=&quot;checkbox&quot; class=&quot;checkbox&quot; /&gt;
      {{ d }}
    &lt;/li&gt;
  &lt;/ul&gt;
  
  &lt;button (click)=&quot;myFunction()&quot;&gt;Clear Checkbox&lt;/button&gt;
  </code></pre>
  <p><strong>app.component.ts</strong></p>
  <pre><code>export class AppComponent {
    data = ['tea', 'coffe', 'soda'];
    public myFunction() {
      (&lt;HTMLInputElement&gt;document.getElementById('checkbox')).checked === false;
    }
  }
  </code></pre>