Update component templateUrl

Proprietary

Updates the templateUrl property value in Angular @Component decorators. Useful for refactoring template file paths or standardizing path conventions.

org.openrewrite.angular.migration.update-component-template-url

Required

The template URL to replace. Can be an exact path (e.g., ./old.html) or a pattern.

The new template URL to use.

Optional

If true, treats oldTemplateUrl as a regex pattern and supports capture groups in newTemplateUrl. Default: false

mod run . --recipe=org.openrewrite.angular.migration.update-component-template-url \ -P oldTemplateUrl=./old-template.html \ -P newTemplateUrl=./new-template.html

Install it once, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.