Remove ComponentFactoryResolver
Recipe ID
org.openrewrite.angular.migration.remove-component-factory-resolverArtifact@openrewrite/recipes-angularReplaces resolver.resolveComponentFactory(Component) with just Component and removes the ComponentFactoryResolver import. Since Ivy, ViewContainerRef.createComponent accepts the component class directly. ComponentFactoryResolver was deprecated in Angular 13 and removed in Angular 16.
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.remove-component-factory-resolverIf the recipe isn’t available locally, install it with:
mod config recipes npm install @openrewrite/recipes-angular