Configure DI, inject() usage, and providers in Angular. Use when configuring Angular dependency injection, using inject(), or defining providers. (triggers: **/*.service.ts, angular inject, providedIn, injection token, provideAppInitializer)
90
87%
Does it follow best practices?
Impact
Pending
No eval scenarios have been run
Passed
No known issues
inject() over Constructor: Use inject(MyService) function in class fields or constructor-equivalent class positions for cleaner injection. It works in any injection context (class fields, factory functions, guards).app.config.ts. Inject with: inject(API_URL).app.config.ts providers array over importing NgModules.useFactory strictly when dependencies need runtime configuration.APP_INITIALIZER token pattern.providedIn: 'root'. This creates instance destroyed when leaving route.providedIn: 'platform': Use 'root' scoping; reserve platform only for Micro Frontend sharing.forwardRef: Refactor architecture to eliminate circular dependencies instead.19a1140
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.