← All recipes
Moderne licensed

Replace createNgModuleRef with createNgModule

Recipe IDorg.openrewrite.angular.migration.replace-create-ng-module-refArtifact@openrewrite/recipes-angular

Renames createNgModuleRef to createNgModule in imports and usages. The deprecated createNgModuleRef alias was removed in Angular 22.

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.migration.replace-create-ng-module-ref

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

mod config recipes npm install @openrewrite/recipes-angular