Angular · Middle · Question 27 of 75

What happens when a lazy route declares providers?

{ path: "admin", providers: [AdminApi], loadChildren: () => import("./admin.routes") }

Explanation

The services live only under /admin, keep feature code out of the root, and are created when the route is first activated.

Further reading

Problem with a question

Angular · Middle · question 27

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