From 142b3873d79a76bb8fa1611676192e55446b11d9 Mon Sep 17 00:00:00 2001 From: Maria Hutt Date: Mon, 10 Apr 2023 12:33:05 -0700 Subject: [PATCH 1/2] docs(nav): clearly state that it's not used for routing --- docs/api/nav.md | 6 +++++- versioned_docs/version-v6/api/nav.md | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/docs/api/nav.md b/docs/api/nav.md index 7a5d975232f..b312154fd10 100644 --- a/docs/api/nav.md +++ b/docs/api/nav.md @@ -19,7 +19,11 @@ import EncapsulationPill from '@components/page/api/EncapsulationPill'; Nav is a standalone component for loading arbitrary components and pushing new components on to the stack. -Unlike Router Outlet, Nav is not tied to a particular router. This means that if we load a Nav component, and push other components to the stack, they will not affect the app's overall router. This fits use cases where you could have a modal, which needs its own sub-navigation, without making it tied to the apps URL. +Unlike Router Outlet, Nav is not tied to a particular router. This means that if we load a Nav component, and push other components to the stack, they will not affect the app's overall router. For example, you should not push a new component to `ion-nav` and expect the URL to update. This fits use cases where you could have a modal, which needs its own sub-navigation, without making it tied to the apps URL. + +:::note +`ion-nav` is not meant to be used for routing. Instead, use `ion-router` for routing. +::: ## Using NavLink diff --git a/versioned_docs/version-v6/api/nav.md b/versioned_docs/version-v6/api/nav.md index 330f38561c4..15b9d2f4881 100644 --- a/versioned_docs/version-v6/api/nav.md +++ b/versioned_docs/version-v6/api/nav.md @@ -23,7 +23,11 @@ import EncapsulationPill from '@components/page/api/EncapsulationPill'; Nav is a standalone component for loading arbitrary components and pushing new components on to the stack. -Unlike Router Outlet, Nav is not tied to a particular router. This means that if we load a Nav component, and push other components to the stack, they will not affect the app's overall router. This fits use cases where you could have a modal, which needs its own sub-navigation, without making it tied to the apps URL. +Unlike Router Outlet, Nav is not tied to a particular router. This means that if we load a Nav component, and push other components to the stack, they will not affect the app's overall router. For example, you should not push a new component to `ion-nav` and expect the URL to update. This fits use cases where you could have a modal, which needs its own sub-navigation, without making it tied to the apps URL. + +:::note +`ion-nav` is not meant to be used for routing. Instead, use `ion-router` for routing. +::: ## Using NavLink From 0ad10bfaadc51a08ace6ad616e2ebf65e7469c65 Mon Sep 17 00:00:00 2001 From: Maria Hutt Date: Tue, 11 Apr 2023 11:47:23 -0700 Subject: [PATCH 2/2] docs(nav): provide framework routing guides --- docs/api/nav.md | 2 +- versioned_docs/version-v6/api/nav.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/api/nav.md b/docs/api/nav.md index b312154fd10..58123c14c3f 100644 --- a/docs/api/nav.md +++ b/docs/api/nav.md @@ -22,7 +22,7 @@ Nav is a standalone component for loading arbitrary components and pushing new c Unlike Router Outlet, Nav is not tied to a particular router. This means that if we load a Nav component, and push other components to the stack, they will not affect the app's overall router. For example, you should not push a new component to `ion-nav` and expect the URL to update. This fits use cases where you could have a modal, which needs its own sub-navigation, without making it tied to the apps URL. :::note -`ion-nav` is not meant to be used for routing. Instead, use `ion-router` for routing. +`ion-nav` is not meant to be used for routing. Instead, see the routing guides for [Angular](../angular/navigation), [React](../react/navigation), and [Vue](../vue/navigation), or [`ion-router`](./router) for vanilla JavaScript projects. ::: ## Using NavLink diff --git a/versioned_docs/version-v6/api/nav.md b/versioned_docs/version-v6/api/nav.md index 15b9d2f4881..a59ce7d562a 100644 --- a/versioned_docs/version-v6/api/nav.md +++ b/versioned_docs/version-v6/api/nav.md @@ -26,7 +26,7 @@ Nav is a standalone component for loading arbitrary components and pushing new c Unlike Router Outlet, Nav is not tied to a particular router. This means that if we load a Nav component, and push other components to the stack, they will not affect the app's overall router. For example, you should not push a new component to `ion-nav` and expect the URL to update. This fits use cases where you could have a modal, which needs its own sub-navigation, without making it tied to the apps URL. :::note -`ion-nav` is not meant to be used for routing. Instead, use `ion-router` for routing. +`ion-nav` is not meant to be used for routing. Instead, see the routing guides for [Angular](../angular/navigation), [React](../react/navigation), and [Vue](../vue/navigation), or [`ion-router`](./router) for vanilla JavaScript projects. ::: ## Using NavLink