Angular · Middle · Question 6 of 75

Which is the best way to display data from an Observable in an OnPush component?

Explanation

A manual subscription assigning a plain field won't be picked up by OnPush without markForCheck, and it also needs manual cleanup. async and toSignal handle both concerns.

Further reading

Problem with a question

Angular · Middle · question 6

Test yourself

Take the Angular · Middle quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz