Skip to content

Commit 2dc8c1c

Browse files
authored
docs(nav): clearly state that it's not used for routing (#2901)
1 parent dee546e commit 2dc8c1c

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

docs/api/nav.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,11 @@ import EncapsulationPill from '@components/page/api/EncapsulationPill';
1919

2020
Nav is a standalone component for loading arbitrary components and pushing new components on to the stack.
2121

22-
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.
22+
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.
23+
24+
:::note
25+
`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.
26+
:::
2327

2428
## Using NavLink
2529

versioned_docs/version-v6/api/nav.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,11 @@ import EncapsulationPill from '@components/page/api/EncapsulationPill';
2323

2424
Nav is a standalone component for loading arbitrary components and pushing new components on to the stack.
2525

26-
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.
26+
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.
27+
28+
:::note
29+
`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.
30+
:::
2731

2832
## Using NavLink
2933

0 commit comments

Comments
 (0)