From c65ab136bf4d1f9ee587d6631f5164aafd54b2c8 Mon Sep 17 00:00:00 2001 From: Andrew Kushnir Date: Thu, 15 Aug 2024 18:20:51 -0700 Subject: [PATCH] docs: cleanup existing migration docs for consistency (#57421) PR Close #57421 --- adev/src/content/reference/migrations/control-flow.md | 5 +++-- adev/src/content/reference/migrations/inject-function.md | 8 +++++--- adev/src/content/reference/migrations/overview.md | 2 -- adev/src/content/reference/migrations/standalone.md | 4 +++- 4 files changed, 11 insertions(+), 8 deletions(-) diff --git a/adev/src/content/reference/migrations/control-flow.md b/adev/src/content/reference/migrations/control-flow.md index c25233d6a62..d1622fbefbf 100644 --- a/adev/src/content/reference/migrations/control-flow.md +++ b/adev/src/content/reference/migrations/control-flow.md @@ -1,9 +1,10 @@ # Migration to Control Flow syntax +[Control flow syntax](guide/templates/control-flow) is available from Angular v17. The new syntax is baked into the template, so you don't need to import `CommonModule` anymore. -[Control flow syntax](guide/templates/control-flow) is available from Angular 17 and simplified way to use the control-flow directives like *ngFor, *ngIf and *ngSwitch. +This schematic migrates all existing code in your application to use new Control Flow Syntax. -The new syntax is baked into the template, so you don't need to import `CommonModule` anymore. But wait there is more to it, there is an migration available for migrating all your old code to use new Control Flow Syntax with Angular 17 release. Run the schematic with the following command: +Run the schematic using the following command: diff --git a/adev/src/content/reference/migrations/inject-function.md b/adev/src/content/reference/migrations/inject-function.md index e31d2d43ab2..3f04f57a59f 100644 --- a/adev/src/content/reference/migrations/inject-function.md +++ b/adev/src/content/reference/migrations/inject-function.md @@ -1,8 +1,10 @@ # Migration to the `inject` function -Angular's `inject` function offers more accurate types and better compatibility with standard -decorators, compared to constructor-based injection. You can convert your application to it by -running the following command: +Angular's `inject` function offers more accurate types and better compatibility with standard decorators, compared to constructor-based injection. + +This schematic converts constructor-based injection in your classes to use the `inject` function instead. + +Run the schematic using the following command: diff --git a/adev/src/content/reference/migrations/overview.md b/adev/src/content/reference/migrations/overview.md index 1a8153d7afe..48ec0e9673a 100644 --- a/adev/src/content/reference/migrations/overview.md +++ b/adev/src/content/reference/migrations/overview.md @@ -5,8 +5,6 @@ Learn about how you can migrate your existing angular project to the latest feat Standalone components provide a simplified way to build Angular applications. Standalone components specify their dependencies directly instead of getting them through NgModules. - - Standalone components, directives, and pipes aim to streamline the authoring experience by reducing the need for NgModules. Control Flow Syntax is available with Angular 17 release and allows you to use more ergonomic syntax which is close to javascript, better type checking and lazy load part of the component. It replaces the need to imports CommonModule to use functionalities like `*ngFor`, `*ngIf`. diff --git a/adev/src/content/reference/migrations/standalone.md b/adev/src/content/reference/migrations/standalone.md index c5c07497000..e3f383af035 100644 --- a/adev/src/content/reference/migrations/standalone.md +++ b/adev/src/content/reference/migrations/standalone.md @@ -4,7 +4,9 @@ -As of version 15.2.0, Angular offers a [schematic](tools/cli/schematics) to help project authors convert existing projects to the standalone APIs. The schematic aims to transform as much code as possible automatically, but it may require some manual fixes by the project author. Run the schematic with the following command: +This schematic helps to transform components, directive and pipes in existing projects to become standalone. The schematic aims to transform as much code as possible automatically, but it may require some manual fixes by the project author. + +Run the schematic using the following command: