<div>
  <form [formGroup]="form" (ngSubmit)="onSubmit()">
    <div *ngFor="let controlName of form.controls | keyvalue">
      <label [for]="controlName.key">{{ controlName.key }}:</label>
      <input [id]="controlName.key" [formControlName]="controlName.key" type="text">
    </div>
    <button type="submit" [disabled]="form.invalid">GO!</button>
  </form>

  <div *ngIf="this.isLoading" class="mt-2">
    Loading 'n' stuff<app-cute-loading></app-cute-loading>
  </div>

  <div *ngIf="jsonResponse" style="border: 1px dashed gray; padding: 10px; margin-top: 10px">
    <pre class="response">{{ jsonResponse | json }}</pre>
  </div>

  <div *ngIf="errorMessage" class="alert alert-danger mt-2 text-center">
    <p>{{ errorMessage }}</p>
  </div>
</div>
