Add static: false to view queries
Recipe ID
org.openrewrite.angular.migration.add-static-false-to-view-queriesArtifact@openrewrite/recipes-angularAdds static: false to @ViewChild and @ContentChild decorators that don't have the static property. Angular 8 requires an explicit static flag for view query decorators. Using static: false preserves the Angular 7 default behavior (queries resolved after change detection).
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.add-static-false-to-view-queriesIf the recipe isn’t available locally, install it with:
mod config recipes npm install @openrewrite/recipes-angular