Based on the following usage of the async pipe, and assuming the users class field is an Observable, how many subscriptions to the users Observable are being made?

<div *ngFor=”let user of users | async”>{{ }}</div>
<div *ngFor=”let user of users | async”>{{ user.age }}</div>
<div *ngFor=”let user of users | async”>{{ user.gender }}</div>
  •  None. The async pipe does not subscribe automatically. None.
  •  None. The template syntax is not correct.
  •  Three. There is one for each async pipe.
  •  One. The async pipe caches Observables by type internally.

Leave a Reply

Your email address will not be published. Required fields are marked *