
To see that in practice, check out this example app. Say you have the following application history: /pageA -> /pageB -> /pageC If you were to call router.go (-2) on /pageC, you would be brought back to /pageA. Combined with the HTML5 History API, you can build a very basic but fully-functional client-side router. Maybe you do want to render something there. Vue Router has a router.go method that allows developers to move forward or backward through the application history. In this article, we will deep dive into Vue Router 4 (used with Vue 3). Vue Router is part of the Vue Ecosystem and is an MIT-licensed open source project with its ongoing development made possible entirely by the support of Sponsors. Vue Router is simple to use, yet powerful. Therefore, you can keep nesting views as much as you need.Īt this point, with the above configuration, when you visit /user/eduardo, nothing will be rendered inside User's router-view, because no nested route is matched. Vue Router is the official library for page navigation in Vue applications. Vue router también permite navegar desde código a las rutas que tienes definidas. This allows you to leverage the component nesting without having to use a nested URL.Īs you can see, the children option is just another Array of routes like routes itself. Vue Router is part of the Vue Ecosystem and is an MIT-licensed open source project with its ongoing development made possible entirely by the support of.


Note that nested paths that start with / will be treated as root paths. The vue-router has more advanced parameters and methods, but we are not jumping into this section in this meantime, and this is the list of properties and method that you can use with.
