Angular · Junior · Question 32 of 75

What does providedIn: 'root' mean?

Explanation

Root services are singletons. If a component lists the service in its own providers, it gets a separate instance for itself and its children.

Further reading

Problem with a question

Angular · Junior · question 32

Test yourself

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

Take this quiz