← All recipes
Moderne licensed

Split a model() that has a matching explicit output

Recipe IDorg.openrewrite.angular.migration.migrate-model-with-outputArtifact@openrewrite/recipes-angular

Rewrites foo = model() to fooInput = input({alias: 'foo'}) plus foo = linkedSignal(this.fooInput) when the same class also declares a fooChange output. model() already contributes a fooChange output, and Angular 22 rejects the resulting duplicate.

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-model-with-output

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

mod config recipes npm install @openrewrite/recipes-angular