Question · Angular course · Module 5: Services and DI
inject() vs constructor
Which method of injecting services is recommended since Angular 14+?
Answer options
- Constructor injection
- The inject() function
- The @Inject decorator
- Direct importing
You can check the correct answer by solving this task in the CodeWorlds game.