Angular · Middle · Question 31 of 75

What is a resolver used for?

Explanation

A ResolveFn returns data (or an Observable/Promise). The trade-off: navigation waits for the data, so for slow requests it is often better to navigate immediately and show a loading state.

Further reading

Problem with a question

Angular · Middle · question 31

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