Angular FAQ: Top Questions
29. What is the async pipe in Angular?
The async
pipe subscribes to an Observable or Promise and returns the latest emitted value. It also handles unsubscribing automatically.
<p>{{ user$ | async }}</p>
- Reduces boilerplate code for subscribing and unsubscribing manually.