Question · Angular course · Module 9: HttpClient

Loading State in a Template with Signals

Which modern control flow syntax will you use in a template to show a spinner while data loads from the loading() signal?

Answer options

  • *ngIf="loading()"
  • @if (loading()) { <app-spinner /> }
  • [hidden]="loading"
  • ng-loading="true"

You can check the correct answer by solving this task in the CodeWorlds game.