Skip to content

Commit

Permalink
docs: add 8 more Vue School links (#1317)
Browse files Browse the repository at this point in the history
  • Loading branch information
danielkellyio committed Feb 28, 2022
1 parent 48bcbe5 commit f951b85
Show file tree
Hide file tree
Showing 9 changed files with 46 additions and 1 deletion.
5 changes: 5 additions & 0 deletions docs/guide/advanced/dynamic-routing.md
@@ -1,5 +1,10 @@
# Dynamic Routing

<VueSchoolLink
href="https://vueschool.io/lessons/vue-router-4-dynamic-routing"
title="Learn how to add routes at runtime"
/>

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
Expand Down
5 changes: 5 additions & 0 deletions docs/guide/advanced/navigation-failures.md
@@ -1,5 +1,10 @@
# Waiting for the result of a Navigation

<VueSchoolLink
href="https://vueschool.io/lessons/vue-router-4-detecting-navigation-failures"
title="Learn how to detect navigation failures"
/>

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.
Expand Down
5 changes: 5 additions & 0 deletions docs/guide/advanced/navigation-guards.md
@@ -1,5 +1,10 @@
# Navigation Guards

<VueSchoolLink
href="https://vueschool.io/lessons/route-guards"
title="Learn how to add 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
Expand Down
5 changes: 5 additions & 0 deletions docs/guide/essentials/named-views.md
@@ -1,5 +1,10 @@
# Named Views

<VueSchoolLink
href="https://vueschool.io/lessons/vue-router-4-named-views"
title="Learn how to use 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
Expand Down
10 changes: 10 additions & 0 deletions docs/guide/essentials/navigation.md
Expand Up @@ -4,6 +4,11 @@ sidebarDepth: 0

# Programmatic Navigation

<VueSchoolLink
href="https://vueschool.io/lessons/vue-router-4-programmatic-navigation"
title="Learn how to navigate programmatically"
/>

Aside from using `<router-link>` to create anchor tags for declarative navigation, we can do this programmatically using the router's instance methods.

## Navigate to a different location
Expand Down Expand Up @@ -75,6 +80,11 @@ router.replace({ path: '/home' })

## Traverse history

<VueSchoolLink
href="https://vueschool.io/lessons/go-back"
title="Learn how to use Vue Router to go back"
/>

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
Expand Down
5 changes: 5 additions & 0 deletions docs/guide/essentials/redirect-and-alias.md
@@ -1,5 +1,10 @@
# Redirect and Alias

<VueSchoolLink
href="https://vueschool.io/lessons/vue-router-4-redirect-and-alias"
title="Learn how to use redirect and alias"
/>

## Redirect

Redirecting is also done in the `routes` configuration. To redirect from `/home` to `/`:
Expand Down
5 changes: 5 additions & 0 deletions docs/guide/essentials/route-matching-syntax.md
@@ -1,5 +1,10 @@
# Routes' Matching Syntax

<VueSchoolLink
href="https://vueschool.io/lessons/vue-router-4-advanced-routes-matching-syntax"
title="Learn how to use advanced route 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
Expand Down
2 changes: 1 addition & 1 deletion docs/guide/index.md
Expand Up @@ -3,7 +3,7 @@
<VueSchoolLink
href="https://vueschool.io/courses/vue-router-4-for-everyone"
title="Learn how to build powerful Single Page Applications with the Vue Router on Vue School"
/>
>Watch a Free Vue Router Video Course</VueSchoolLink>
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:

Expand Down
5 changes: 5 additions & 0 deletions docs/introduction.md
@@ -1,5 +1,10 @@
# Introduction

<VueSchoolLink
href="https://vueschool.io/courses/vue-router-4-for-everyone"
title="Learn how to build powerful Single Page Applications with the Vue Router on Vue School"
>Watch a Free Vue Router Video Course</VueSchoolLink>
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
Expand Down

0 comments on commit f951b85

Please sign in to comment.