title: Angular ngIf not displaying element when set to true
body: <p>I want to use an ngIf statement to render some HTML code after a certain period of time. Simplified for easier reproducibility, my HTML looks like this:</p>
  <pre><code>&lt;div *ngIf=&quot;reload===true&quot;&gt;
    &lt;p&gt;Hello world&lt;/p&gt;
  &lt;/div&gt;
  </code></pre>
  <p>and my Typescript, which sets the <code>reload</code> variable to <code>true</code> after two seconds, looks like this:</p>
  <pre><code>  reload: boolean;
  
    ngOnInit(): void {
      this.reload = false;
  
      setTimeout(
        function() {
          this.reload = true;
          console.log(this.reload)
         }, 2000);
    }
  </code></pre>
  <p>Console logging <code>reload</code> indicates that this variable is being set to <code>true</code>. However, the code does not render in the view. Any ideas why?</p>