From: Daniel Kelly Date: Mon, 28 Feb 2022 14:37:28 +0000 (-0600) Subject: docs: add 8 more Vue School links (#1317) X-Git-Tag: v4.0.13~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f951b85f54c80d9ecd09a5d604859c0aa036b7ea;p=thirdparty%2Fvuejs%2Frouter.git docs: add 8 more Vue School links (#1317) --- diff --git a/docs/guide/advanced/dynamic-routing.md b/docs/guide/advanced/dynamic-routing.md index 440cc845..6b0e49fd 100644 --- a/docs/guide/advanced/dynamic-routing.md +++ b/docs/guide/advanced/dynamic-routing.md @@ -1,5 +1,10 @@ # Dynamic Routing + + Adding routes to your router is usually done via the [`routes` option](../../api/#routes) but in some situations, you might want to add or remove routes while the application is already running. Application with extensible interfaces like [Vue CLI UI](https://cli.vuejs.org/dev-guide/ui-api.html) can use this to make the application grow. ## Adding Routes diff --git a/docs/guide/advanced/navigation-failures.md b/docs/guide/advanced/navigation-failures.md index ebca4585..28b2db48 100644 --- a/docs/guide/advanced/navigation-failures.md +++ b/docs/guide/advanced/navigation-failures.md @@ -1,5 +1,10 @@ # Waiting for the result of a Navigation + + When using `router-link`, Vue Router calls `router.push` to trigger a navigation. While the expected behavior for most links is to navigate a user to a new page, there are a few situations where users will remain on the same page: - Users are already on the page that they are trying to navigate to. diff --git a/docs/guide/advanced/navigation-guards.md b/docs/guide/advanced/navigation-guards.md index ec1ed61e..04fe4d63 100644 --- a/docs/guide/advanced/navigation-guards.md +++ b/docs/guide/advanced/navigation-guards.md @@ -1,5 +1,10 @@ # Navigation Guards + + As the name suggests, the navigation guards provided by Vue router are primarily used to guard navigations either by redirecting it or canceling it. There are a number of ways to hook into the route navigation process: globally, per-route, or in-component. ## Global Before Guards diff --git a/docs/guide/essentials/named-views.md b/docs/guide/essentials/named-views.md index 0fc6f0ae..f8604479 100644 --- a/docs/guide/essentials/named-views.md +++ b/docs/guide/essentials/named-views.md @@ -1,5 +1,10 @@ # Named Views + + Sometimes you need to display multiple views at the same time instead of nesting them, e.g. creating a layout with a `sidebar` view and a `main` view. This is where named views come in handy. Instead of having one single outlet in your view, you can have multiple and give each of them a name. A `router-view` without a name will be given `default` as its name. ```html diff --git a/docs/guide/essentials/navigation.md b/docs/guide/essentials/navigation.md index 14b2eb9b..af868da1 100644 --- a/docs/guide/essentials/navigation.md +++ b/docs/guide/essentials/navigation.md @@ -4,6 +4,11 @@ sidebarDepth: 0 # Programmatic Navigation + + Aside from using `` to create anchor tags for declarative navigation, we can do this programmatically using the router's instance methods. ## Navigate to a different location @@ -75,6 +80,11 @@ router.replace({ path: '/home' }) ## Traverse history + + This method takes a single integer as parameter that indicates by how many steps to go forward or go backward in the history stack, similar to `window.history.go(n)`. Examples diff --git a/docs/guide/essentials/redirect-and-alias.md b/docs/guide/essentials/redirect-and-alias.md index c91ead37..5bbb87fa 100644 --- a/docs/guide/essentials/redirect-and-alias.md +++ b/docs/guide/essentials/redirect-and-alias.md @@ -1,5 +1,10 @@ # Redirect and Alias + + ## Redirect Redirecting is also done in the `routes` configuration. To redirect from `/home` to `/`: diff --git a/docs/guide/essentials/route-matching-syntax.md b/docs/guide/essentials/route-matching-syntax.md index d61fea32..b1130363 100644 --- a/docs/guide/essentials/route-matching-syntax.md +++ b/docs/guide/essentials/route-matching-syntax.md @@ -1,5 +1,10 @@ # Routes' Matching Syntax + + Most applications will use static routes like `/about` and dynamic routes like `/users/:userId` like we just saw in [Dynamic Route Matching](./dynamic-matching.md), but Vue Router has much more to offer! :::tip diff --git a/docs/guide/index.md b/docs/guide/index.md index 152f3bda..243f9119 100644 --- a/docs/guide/index.md +++ b/docs/guide/index.md @@ -3,7 +3,7 @@ +>Watch a Free Vue Router Video Course Creating a Single-page Application with Vue + Vue Router feels natural: with Vue.js, we are already composing our application with components. When adding Vue Router to the mix, all we need to do is map our components to the routes and let Vue Router know where to render them. Here's a basic example: diff --git a/docs/introduction.md b/docs/introduction.md index 87ace9b7..5497d2b9 100644 --- a/docs/introduction.md +++ b/docs/introduction.md @@ -1,5 +1,10 @@ # Introduction +Watch a Free Vue Router Video Course + Vue Router is the official router for [Vue.js](https://vuejs.org). It deeply integrates with Vue.js core to make building Single Page Applications with Vue.js a breeze. Features include: - Nested routes mapping