From d088ba107e0e7c9db3c07643234c88e36e5279b3 Mon Sep 17 00:00:00 2001 From: Marlon Harrison <92547717+marlon-ionic@users.noreply.github.com> Date: Tue, 16 Jul 2024 17:44:25 -0500 Subject: [PATCH 1/2] add mention of IonRouterLink Added mention of the need for`IonRouterLink` or `IonRouterLinkWithHref` directives based on the info in step 9 of https://ionicframework.com/docs/angular/build-options#standalone-based-applications. --- docs/angular/navigation.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/docs/angular/navigation.md b/docs/angular/navigation.md index c181346cfa3..d2bec3d1eba 100644 --- a/docs/angular/navigation.md +++ b/docs/angular/navigation.md @@ -192,8 +192,7 @@ Developers can use the existing syntax for standalone component routing from Ang }) export class AppRoutingModule {} ``` - -To get started with standalone components [visit Angular's official docs](https://angular.io/guide/standalone-components). +If you are using `routerLink`, `routerDirection`, or `routerAction` be sure to also import the `IonRouterLink` directive for Ionic components or the `IonRouterLinkWithHref` directive for elements. To get started with standalone components [visit Angular's official docs](https://angular.io/guide/standalone-components). ## Live Example From bdb61a59fb4b3a300f2371825cb931a8a1b5aa21 Mon Sep 17 00:00:00 2001 From: Maria Hutt Date: Thu, 18 Jul 2024 11:22:33 -0700 Subject: [PATCH 2/2] docs(angular): update tip and fix build error --- docs/angular/navigation.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/docs/angular/navigation.md b/docs/angular/navigation.md index d2bec3d1eba..85ef25c63ce 100644 --- a/docs/angular/navigation.md +++ b/docs/angular/navigation.md @@ -192,7 +192,12 @@ Developers can use the existing syntax for standalone component routing from Ang }) export class AppRoutingModule {} ``` -If you are using `routerLink`, `routerDirection`, or `routerAction` be sure to also import the `IonRouterLink` directive for Ionic components or the `IonRouterLinkWithHref` directive for elements. To get started with standalone components [visit Angular's official docs](https://angular.io/guide/standalone-components). + +:::tip +If you are using `routerLink`, `routerDirection`, or `routerAction` be sure to also import the `IonRouterLink` directive for Ionic components or the `IonRouterLinkWithHref` directive for `` elements. An example of this is available in the [Ionic Angular Build Options docs](./build-options.md#migrating-from-modules-to-standalone). +::: + +To get started with standalone components [visit Angular's official docs](https://angular.io/guide/standalone-components). ## Live Example