← All recipes
Moderne licensed

Migrate query decorators to signal-based functions

Recipe IDorg.openrewrite.angular.migration.migrate-query-to-signalArtifact@openrewrite/recipes-angular

Converts @ViewChild(), @ViewChildren(), @ContentChild(), and @ContentChildren() decorated properties to signal-based query functions. For example, @ViewChild('ref') el: ElementRef becomes el = viewChild<ElementRef>('ref').

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.migrate-query-to-signal

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

mod config recipes npm install @openrewrite/recipes-angular