Angular · Senior · Question 65 of 75

What is the main benefit of using inject() over constructor parameters in base classes?

Explanation

Field initializers with inject() are inherited. It also works in functions like guards and resolvers.

Further reading

Problem with a question

Angular · Senior · question 65

Test yourself

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

Take this quiz