title: How to show spinner (or anything else) on page load in Angular 5?
body: <p>I'm trying to show an image on page load (and the general idea is to show a spinner) but it doesn't show up:</p>
  
  <pre><code>import { Component, OnInit } from '@angular/core';
  
  @Component({
      selector: 'app-form',
      templateUrl: './form.component.html'
  })
  export class FormComponent implements OnInit {
  
      loading = true;
  
      constructor() { }
  
      ngOnInit() {
          this.loading = true;
      }
  
  }
  </code></pre>
  
  <p>In the html:</p>
  
  <pre><code>&lt;app-form&gt;
      &lt;img *ngIf="loading" src="/assets/img/logo.png" /&gt;
  &lt;/app-form&gt;
  </code></pre>
  
  <p><code>form.component</code> template sits within <code>&lt;app&gt;</code> module.</p>