title: I selected checkboxes, I run a function and update something. After the execution, I want to deselect those checkboxes in the UI
body: <p>HTML for checkbox:</p>
  <p>&lt;ng-container *ngFor=&quot;let item of n; let i=index &quot;&gt;</p>
  <p>&lt;mat-checkbox [(ngModel)]=&quot;item.isSelected&quot; (change)=&quot;checkIfAllSelected()&quot;
  (click)=&quot;$event.stopPropagation();&quot;&gt;</p>
   
  
  <p>ts file with the update function:</p>
  <p>update(){</p>
  <p>this.selected = this.n.filter(n1 =&gt; n1.isSelected === true);</p>
  <p>let selectedIds = this.selected.map(x =&gt; x.id);</p>
  <p>this._nService.updateService(selectedIds)
  .then(resp =&gt; {</p>
  <pre><code>  if (resp) {
  
      
      for(var i = 0;i&lt;this.n.length;i++){
        if(selectedIds.some(id =&gt; id === this.n[i].id)){
          this.n[i].isRead = true;
          console.log(this.n[i].id);
        }
      }
    }
  }).catch(err =&gt; {
    this._alertService.showAlert(AlertType.ERROR);
  });
  </code></pre>
  <p>}</p>
  <p>checkIfAllSelected() {</p>
  <p>this.selectedAll = this.n.every(function(item:any) {</p>
  <pre><code>  return item.isSelected == true;
  
  })
  </code></pre>
  <p>}</p>