vue router html后缀,vue-router.html
生活随笔
收集整理的這篇文章主要介紹了
vue router html后缀,vue-router.html
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
Document
Hello App!
Go to Foo
Go to Bar
// 1. 定義(路由)組件。
// 可以從其他文件 import 進來
const Foo = { template: '
foo' }const Bar = { template: '
bar' }// 2. 定義路由
const routes = [
{ path: '/foo', component: Foo },
{ path: '/bar', component: Bar }
]
// 3. 創建 router 實例,然后傳 `routes` 配置
// 你還可以傳別的配置參數, 不過先這么簡單著吧。
const router = new VueRouter({
routes // (縮寫)相當于 routes: routes
})
// 4. 創建和掛載根實例。
// 記得要通過 router 配置參數注入路由,
// 從而讓整個應用都有路由功能
const app = new Vue({
router
}).$mount('#app')
總結
以上是生活随笔為你收集整理的vue router html后缀,vue-router.html的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 车位预定查询html格式,停车场车位预定
- 下一篇: 使用read_html爬取网页表哥,Py