Configure DI, inject() usage, and providers in Angular. Use when configuring Angular dependency injection, using inject(), or defining providers.
82
80%
Does it follow best practices?
Impact
Pending
No eval scenarios have been run
Passed
No known issues
Optimize this skill with Tessl
npx tessl skill review --optimize ./skills/angular/angular-dependency-injection/SKILL.mdinject() 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.4c72e76
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.