Angular Template Iteration Over an Observable Array

Ole Ersoy
Feb 28, 2021
Image by Pexels from Pixabay

Updated Version

There’s an updated version of this article here:

Scenario

We have an customers$:Observable<string[]> that we want to iterate over in our Angular template.

Approach

<ul>   
<li *ngFor="let customer of customers$ | async; index as i">
{{ customer.name }}
</li>
</ul>

--

--