From: Curt Grimes Date: Sat, 29 Jun 2024 15:04:58 +0000 (-0500) Subject: docs: fix punctuation (#2286) X-Git-Tag: v4.4.1~12 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=accea8e2434654706b432711d48b6ba57383458b;p=thirdparty%2Fvuejs%2Frouter.git docs: fix punctuation (#2286) Fix punctuation and comma splices in a few spots. --- diff --git a/packages/docs/guide/advanced/dynamic-routing.md b/packages/docs/guide/advanced/dynamic-routing.md index d8d83b79..5488b2fa 100644 --- a/packages/docs/guide/advanced/dynamic-routing.md +++ b/packages/docs/guide/advanced/dynamic-routing.md @@ -5,7 +5,7 @@ title="Learn how to add routes at runtime" /> -Adding routes to your router is usually done via the `routes` option 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 to your router is usually done via the `routes` option but in some situations, you might want to add or remove routes while the application is already running. Applications 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 @@ -20,13 +20,13 @@ const router = createRouter({ }) ``` -Going to any page, `/about`, `/store`, or `/3-tricks-to-improve-your-routing-code` ends up rendering the `Article` component. If we are on `/about` and we add a new route: +Going to any page like `/about`, `/store`, or `/3-tricks-to-improve-your-routing-code` ends up rendering the `Article` component. If we are on `/about` and we add a new route: ```js router.addRoute({ path: '/about', component: About }) ``` -The page will still show the `Article` component, we need to manually call `router.replace()` to change the current location and overwrite where we were (instead of pushing a new entry, ending up in the same location twice in our history): +The page will still show the `Article` component. We need to manually call `router.replace()` to change the current location and overwrite where we were (instead of pushing a new entry, ending up in the same location twice in our history): ```js router.addRoute({ path: '/about', component: About }) @@ -89,7 +89,7 @@ Whenever a route is removed, **all of its aliases and children** are removed wit ## Adding nested routes -To add nested routes to an existing route, you can pass the _name_ of the route as its first parameter to `router.addRoute()`, this will effectively add the route as if it was added through `children`: +To add nested routes to an existing route, you can pass the _name_ of the route as its first parameter to `router.addRoute()`. This will effectively add the route as if it was added through `children`: ```js router.addRoute({ name: 'admin', path: '/admin', component: Admin }) @@ -111,5 +111,5 @@ router.addRoute({ Vue Router gives you two functions to look at existing routes: -- [`router.hasRoute()`](/api/interfaces/Router.md#hasRoute): check if a route exists +- [`router.hasRoute()`](/api/interfaces/Router.md#hasRoute): check if a route exists. - [`router.getRoutes()`](/api/interfaces/Router.md#getRoutes): get an array with all the route records.