Skip to content

Commit e19fcac

Browse files
authored
Update manual-routing.md
1 parent a5068b3 commit e19fcac

File tree

1 file changed

+6
-116
lines changed

1 file changed

+6
-116
lines changed

content/docs/en/routing/manual-routing.md

Lines changed: 6 additions & 116 deletions
Original file line numberDiff line numberDiff line change
@@ -182,51 +182,7 @@ const Detail = {
182182

183183
Use `$showModal` to show the `Detail` page modally. This function behaves similarly to `$navigateTo`.
184184

185-
You can call `$showModal` in the view or in a method. To close the modal, call `$modal.close`.
186-
187-
#### In the view
188-
189-
In the `Master` component, use a `data` property to expose the `Detail` component. Invoke `$showModal(<propertyName>)` in the view directly.
190-
191-
```Vue
192-
import Vue from 'nativescript-vue';
193-
194-
const Master = {
195-
template: `
196-
<Page>
197-
<ActionBar title="Master" />
198-
<StackLayout>
199-
<Button text="To Details directly" @tap="$showModal(detailPage)" />
200-
</StackLayout>
201-
</Page>
202-
`,
203-
204-
data() {
205-
return {
206-
detailPage: Detail
207-
}
208-
}
209-
};
210-
211-
const Detail = {
212-
template: `
213-
<Page>
214-
<ActionBar title="Detail"/>
215-
<StackLayout>
216-
<Button @tap="$modal.close" text="Close" />
217-
</StackLayout>
218-
</Page>
219-
`
220-
};
221-
222-
new Vue({
223-
render: h => h('frame', [h(Master)])
224-
}).$start()
225-
```
226-
227-
#### In a method
228-
229-
Bind a button to a method and use `this.$showModal(Detail)` to navigate to the `Detail` component.
185+
To close the modal, call `$modal.close`.
230186

231187
```Vue
232188
const Master = {
@@ -315,80 +271,14 @@ this.$showModal(Detail).then(data => console.log(data));
315271
<Button @tap="$modal.close('Foo')" text="Close" />
316272
```
317273

318-
### BottomNavigation and Tabs Navigation
319-
320-
The `<BottomNavigation>` and `<Tabs>` components enable the user to arbitrarily navigate between several UI containers at the same level. A key feature of these components is that they keep the state of the containers that are not visible. This means that when the user comes back to a previous tab, the data, scroll position and navigation state should be like they left them.
321-
322-
The examples below use the `<BottomNavigation>` component. You can use the same markup for the `<Tabs>` component. Just replace the `<BottomNavigation>` tags with `<Tabs>` tags.
323-
324-
The `<BottomNavigation>` container provides its lateral navigation logic automatically by providing the user with tabs which they can select. To set up a `<BottomNavigation>` you need to simply declare the UI of each container (within a `<TabContentItem>`) and the title and icon you want to be shown in its representing tab (within a `<TabStripItem>`). Each separate UI container is represented by a `<TabContentItem>`. A `<TabContentItem>` can have one root component. As with other containers, you can enable forward and backward navigation inside each `<TabContentItem>` by embedding a `<Frame>` in it.
325-
326-
```Vue
327-
import Vue from 'nativescript-vue';
328-
329-
import Items from './components/Items.vue';
330-
import Browse from './components/Browse.vue';
331-
import Search from './components/Search.vue';
332-
333-
const App = {
334-
components: {
335-
Items,
336-
Browse,
337-
Search
338-
},
339-
340-
template: `
341-
<BottomNavigation>
342-
<TabStrip>
343-
<TabStripItem>
344-
<Label text="Home"></Label>
345-
</TabStripItem>
346-
<TabStripItem>
347-
<Label text="Browse"></Label>
348-
</TabStripItem>
349-
<TabStripItem>
350-
<Label text="Search"></Label>
351-
</TabStripItem>
352-
</TabStrip>
353-
354-
<TabContentItem>
355-
<Frame id="homeTabFrame">
356-
<Items />
357-
</Frame>
358-
</TabContentItem>
359-
360-
<TabContentItem>
361-
<Frame id="browseTabFrame">
362-
<Browse />
363-
</Frame>
364-
</TabContentItem>
365-
366-
<TabContentItem>
367-
<Frame id="searchTabFrame">
368-
<Search />
369-
</Frame>
370-
</TabContentItem>
371-
</BottomNavigation>
372-
`
373-
};
374-
375-
new Vue({
376-
render: h => h(App)
377-
}).$start();
378-
```
379-
380-
To create a new application utilizing the `<BottomNavigation>` component run:
381-
382-
```bash
383-
tns create my-app-name --template tns-template-tab-navigation-vue
384-
```
385-
386274
### SideDrawer Navigation
387275

388-
The `<RadSideDrawer>` component enables the user to open a hidden view, i.e. drawer, containing navigation controls, or settings from the sides of the screen. For more information about it, read the [dedicated article](https://docs.nativescript.org/vuejs/ns-ui/SideDrawer/getting-started).
276+
We've built `<MultiDrawer>` to allow showing multiple drawers on the screen from all sides. Refer to the docs in the project github page: https://github.com/nativescript-vue/nativescript-vue-multi-drawer
277+
278+
Another option is the `<RadSideDrawer>` component. For more information, refer to the [dedicated article](https://v7.docs.nativescript.org/vuejs/ns-ui/SideDrawer/getting-started).
389279

390-
To create a new application utilizing the `<RadSideDrawer>` component run:
280+
To create a new application with `<RadSideDrawer>` run:
391281

392282
```bash
393-
tns create my-app-name --template tns-template-drawer-navigation-vue
283+
ns create myDrawerApp --template @nativescript/template-drawer-navigation-vue
394284
```

0 commit comments

Comments
 (0)