Get the App
SLTechnology News&Howtos  ›  Development  › 

How to realize routing lazy loading by vue

Shulou Source: shulou.com Published: 2022-06-01 04:09:51 11月12日 Update

This article mainly introduces vue how to achieve routing lazy loading, has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, the following let the editor take you to know about it.

Route lazy loading method:

/ / the method I have adopted is more concise and one step less to introduce assignment. Const router = new VueRouter ({routes: [path:'/ app', component: () = > import ('. / app'), / / introduction component]}) / / Vue routing document is written: const app = () = > import ('. / app.vue') / / introduction component const router = new VueRouter ({routes: [{path:'/ app', component: app}]}) Thank you for reading this article carefully I hope the article "how to achieve routing lazy loading in vue" shared by the editor is helpful to everyone. At the same time, I also hope that you can support us and pay attention to the industry information channel. More related knowledge is waiting for you to learn!

Tags: Routing articles writing components simplicity personal value interests at the same time feelings documents methods more friends knowledge editing industry information information channels channels Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno vpn OPPO Reno Shulou Technology Docker Huawei