Skip to content

Commit 3d33ac7

Browse files
authored
docs(vue): document useIonRouter replace using 'none' direction to preserve stack (#4794)
1 parent 73f2e03 commit 3d33ac7

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎docs/vue/utility-functions.mdx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ interface UseIonRouterResult {
6969
forward: (routerAnimation?: AnimationBuilder) => void;
7070
navigate: (
7171
location: string | Location,
72-
routerDirection?: 'forward' | 'back' | 'root',
72+
routerDirection?: 'forward' | 'back' | 'root' | 'none',
7373
routerAction?: 'push' | 'pop' | 'replace',
7474
routerAnimation?: AnimationBuilder
7575
) => void;
@@ -80,7 +80,7 @@ useIonRouter(): UseIonRouterResult;
8080

8181
- The `push` method is the equivalent of calling `ionRouter.navigate(location, 'forward', 'push', animation)`.
8282

83-
- The `replace` method is the equivalent of calling `ionRouter.navigate(location, 'root', 'replace', animation)`.
83+
- The `replace` method is the equivalent of calling `ionRouter.navigate(location, 'none', 'replace', animation)`. It swaps the current page for the new one and keeps the pages beneath it, so the back button still returns to the previous page. No transition plays unless an `animation` is passed. To clear the navigation stack instead, call `ionRouter.navigate(location, 'root', 'replace', animation)`.
8484

8585
Refer to the [Vue Navigation Documentation](./navigation#navigating-using-useionrouter) for more usage examples.
8686

0 commit comments

Comments
 (0)