You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs(react,angular): use ionPage prop for nested outlets and add navigation playgrounds (#4454)
* docs(react-router): working on v9 migration docs for react router
* docs(react-router): update navigation guide and expand v5-to-v6 migration guide
* chore(lint): running lint
* fix(build): fixing build error
* docs(react-router): fixing several issues
* docs(react-router): converting playground example to rr6
* docs(react-router): updating dependencies, reverting phrasing change
* docs(react): fix nested IonRouterOutlet examples and replace live example
* fix(docs): use playground component for angular navigation
* chore(lint): running lint
* fix(angular): add missing RouterLink import to dashboard component
* refactor: consolidate angular/react navigation playgrounds into single directory
* feat(playground): add default framework setting, migration angular/react navigation live example to use one playground
* fix(playground): allow playground swapping with default framework set
* docs(navigation): combine playground code to one index file
---------
Co-authored-by: Brandy Smith <6577830+brandyscarney@users.noreply.github.com>
Copy file name to clipboardExpand all lines: docs/angular/navigation.md
+3-1Lines changed: 3 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -201,7 +201,9 @@ To get started with standalone components [visit Angular's official docs](https:
201
201
202
202
## Live Example
203
203
204
-
If you would prefer to get hands on with the concepts and code described above, please checkout our [live example](https://stackblitz.com/edit/ionic-angular-routing?file=src/app/app-routing.module.ts) of the topics above on StackBlitz.
204
+
import NavigationPlayground from '@site/static/usage/v9/navigation/index.md';
Since the parent route already matches `/dashboard/*`, the child routes use **relative paths**. The `index` route matches the parent path (`/dashboard`) and `"users/:id"` resolves to `/dashboard/users/:id`. Absolute paths (e.g., `path="/dashboard/users/:id"`) still work if you prefer explicit full paths.
73
69
74
-
These routes are grouped in an `IonRouterOutlet`.
70
+
Note the `ionPage` prop on `IonRouterOutlet`. When a component serves as a nested outlet rendered directly by a `Route` in a parent outlet, the inner `IonRouterOutlet` must include the `ionPage` prop. Without it, router outlets can overlap during navigation and cause broken transitions. Wrapping the outlet in an `IonPage` is not needed and should be avoided in this case.
71
+
72
+
These routes are grouped in an `IonRouterOutlet`, let's discuss that next.
75
73
76
74
## Components
77
75
@@ -92,35 +90,27 @@ We can define a fallback route by placing a `Route` component with a `path` of `
Here, we see that in the event a location does not match the first two `Route`s the `IonRouterOutlet` will redirect the Ionic React app to the `/dashboard` path.
109
103
110
104
You can alternatively supply a component to render instead of providing a redirect.
@@ -511,7 +499,9 @@ The example below shows how the Spotify app reuses the same album component to s
511
499
512
500
## Live Example
513
501
514
-
If you would prefer to get hands on with the concepts and code described above, please checkout our [live example](https://stackblitz.com/edit/ionic-react-routing?file=src/index.tsx) of the topics above on StackBlitz.
502
+
import NavigationPlayground from '@site/static/usage/v9/navigation/index.md';
0 commit comments