DEV Community

Discussion on: Angular Dependency Injection Infographic

Collapse
layzee profile image
Lars Gyrup Brink Nielsen • Edited on
  1. I have an example of what to use a module scope for in my article "Tree-shakable dependencies in Angular projects". Of course, the providedIn: MyModule syntax is just the tree-shakable way of expressing the module provider scope that's been around since v2.0.0 (the providers metadata for Angular modules).

  2. I would say remove it. It's been deprecated for almost 3 years (since v4.0.0). Some projects use it for dynamic injection tokens, but that's an edge case and should be implemented using a Map of InjectionTokens or something like that instead.

Thread Thread
christiankohler profile image
Christian Kohler Author

Thank you. Great article.