title: Update the boolean in the main Angular 'thread' async/await
body: <p>I have the following <code>async</code> method. I use a loader in order to update the user interface, visibility of which is based on the <code>isExporting</code> flag.</p>
  <pre><code>public async copyToClipboard(element: HTMLDivElement): Promise&lt;void&gt; {
  
    this.isExporting = true; // &lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt; HERE
  
    const data = await html2canvas(element, { scale: 1.5 }).then((canvas) =&gt; {
      canvas.toBlob((blob) =&gt; {
        const item = new ClipboardItem({ 'image/png': blob! });
        navigator.clipboard.write([item]).then((res) =&gt; {
  
          this.isExporting = false; // &lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt; HERE
  
          this.notyfService.instance.success({
            message: this.translateService.instant('message.export.success'),
            duration: 2000
          });
        });
      });
    });
  }
  </code></pre>
  <p>Then I have</p>
  <pre><code>&lt;button [disabled]=&quot;isExporting&quot; (click)=&quot;copyToClipboard(container!)&quot;&gt;
      &lt;kendo-loader *ngIf=&quot;isExporting&quot;&gt; &lt;/kendo-loader&gt;
  &lt;/button&gt;
  </code></pre>
  <p>Even if <code>isExporting</code> is set to <code>false</code> <em>before</em> the NotifyService message, I get first of all the service message popup after the clipboard is updated, and only several seconds after the message the loader disappears - <code>isExporting</code> is updated in the main 'thread'.</p>
  <p>Is there a way to notify the main 'thread' that <code>isExporting</code> is updated immediately?</p>