|
2 | 2 | title: Navigation/Routing
|
3 | 3 | ---
|
4 | 4 |
|
5 |
| -Since Svelte Native is a thin bridge between Svelte and NativeScript. It is best if you familiarize yourself with the core concept of [routing in NativeScript](https://docs.nativescript.org/core-concepts/navigation) |
| 5 | +Since Svelte Native is a thin bridge between Svelte and NativeScript. It is best if you familiarize yourself with the core concept of [routing in NativeScript](https://docs.nativescript.org/core-concepts/navigation). |
6 | 6 |
|
7 | 7 | Routing in Svelte Native is designed to be very similar and the `svelte-native` module exposes the following functions:
|
8 | 8 |
|
@@ -53,7 +53,7 @@ You can specify the props used to create the Svelte component using the `props`
|
53 | 53 |
|
54 | 54 | #### Specifying a Frame
|
55 | 55 |
|
56 |
| -Each `<frame>` element has its own navigation stack. If you are using multiple frames, you may want to specify in which frame the navigation will occur. For example, having a button in the side bar that changes the page in the main area. You can do this by adding the `frame` option: |
| 56 | +Each `<frame>` element has its own navigation stack. If you are using multiple frames, you may want to specify in which frame the navigation will occur. For example, having a button in the sidebar that changes the page in the main area. You can do this by adding the `frame` option: |
57 | 57 |
|
58 | 58 | ```js
|
59 | 59 | navigate({
|
@@ -106,7 +106,7 @@ goBack({ to: options_page_ref })
|
106 | 106 |
|
107 | 107 | ### showModal
|
108 | 108 |
|
109 |
| -To show a page or component modally use the `showModal` function. Specify the page to open using the `page` option and props using the `props` option (just like in [navigate](#navigate)) |
| 109 | +To show a page or component modally use the `showModal` function. Specify the page to open using the `page` option and props using the `props` option (just like in [navigate](#navigate)). |
110 | 110 |
|
111 | 111 | ```html
|
112 | 112 | <!--{ filename: 'App.svelte'} -->
|
@@ -137,7 +137,7 @@ To show a page or component modally use the `showModal` function. Specify the pa
|
137 | 137 |
|
138 | 138 | The other options available correspond directly to those in [ShowModalOptions](https://docs.nativescript.org/api-reference/interfaces/_ui_core_view_base_.showmodaloptions) and are passed through to the underlying NativeScript showModal method.
|
139 | 139 |
|
140 |
| -The `showModal` function returns a promise which resolves to whatever is passed to `closeModal` |
| 140 | +The `showModal` function returns a promise which resolves to whatever is passed to `closeModal`. |
141 | 141 |
|
142 | 142 | > **NOTE** The modal is opened in a new navigation context. If you want to allow navigation within the modal, or show an action bar, you will need to wrap the target page in a `frame` element. If you don't need any navigation within the modal then this won't be necessary.
|
143 | 143 |
|
|
0 commit comments