From 0726ae9e831576c5ef39b49cd36732a842169383 Mon Sep 17 00:00:00 2001 From: "Lea\\Anthony" Date: Sun, 5 Dec 2021 22:18:52 +1100 Subject: [PATCH] [website] Added router guide --- website/docs/guides/routing.mdx | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 website/docs/guides/routing.mdx diff --git a/website/docs/guides/routing.mdx b/website/docs/guides/routing.mdx new file mode 100644 index 000000000..9596bb20b --- /dev/null +++ b/website/docs/guides/routing.mdx @@ -0,0 +1,19 @@ + +# Routing + +Routing is a popular way to switch views in an application. This page offers some guidance around how to do that. + +## Vue + +The recommended approach for routing in Vue is [Hash Mode](https://next.router.vuejs.org/guide/essentials/history-mode.html#hash-mode): + +```js +import { createRouter, createWebHashHistory } from 'vue-router' + +const router = createRouter({ + history: createWebHashHistory(), + routes: [ + //... + ], +}) +``` \ No newline at end of file