← All recipes
Moderne licensed

Find createComponent calls with empty projectableNodes

Recipe IDorg.openrewrite.angular.search.find-empty-projectable-nodesArtifact@openrewrite/recipes-angular

Finds createComponent() calls that pass empty arrays in projectableNodes. In Angular 19, passing an empty array now renders the default ng-content fallback content. To suppress fallback content, pass [document.createTextNode('')] instead.

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-empty-projectable-nodes

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

mod config recipes npm install @openrewrite/recipes-angular