← All recipes
Moderne licensed

Find classes with DI dependencies but missing @Injectable()

Recipe IDorg.openrewrite.angular.search.find-missing-injectableArtifact@openrewrite/recipes-angular

Finds classes that have constructor parameters (suggesting dependency injection) but lack an @Injectable() or other Angular class-level decorator. Angular 9 with Ivy requires an explicit @Injectable() decorator for all services that use dependency injection.

Single recipeProprietary

Usage

This recipe has no required configuration options. You’ll need the Moderne CLI configured before running the command below.

mod run . --recipe org.openrewrite.angular.search.find-missing-injectable

If the recipe isn’t available locally, install it with:

mod config recipes npm install @openrewrite/recipes-angular