← All recipes
Moderne licensed

Upgrade to Angular 9

Recipe IDorg.openrewrite.angular.UpgradeToAngular9Artifact@openrewrite/recipes-angular

Migrates Angular 8.x applications to Angular 9. This includes removing the now-default static: false from view query decorators, replacing TestBed.get() with TestBed.inject(), adding generic type parameters to ModuleWithProviders, enabling AOT compilation in angular.json, updating tsconfig.json module settings for Ivy, flagging removed View Engine APIs (Renderer, RenderComponentType, RootRenderer), and upgrading Angular, TypeScript, and related dependency versions.

Composite 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.UpgradeToAngular9

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

mod config recipes npm install @openrewrite/recipes-angular

Definition

This recipe runs the following recipes in order.