【发布时间】:2020-01-22 03:38:58
【问题描述】:
我尝试使用 Framework7 核心(没有节点、React、Vue)创建一个网络应用程序。
我发现点击index.html底部的标签页没有显示出来。
Here 你可以看到我的文件(来自 framework7 模板)。
我不明白为什么它们不动态加载。
<!-- Catalog View -->
<div id="view-catalog" class="view view-init tab" data-view="catalog" data-url="/catalog/">
<!-- Catalog page will be loaded here dynamically from /catalog/ route -->
</div>
<!-- Settings View -->
<div id="view-settings" class="view tab">
<!-- Settings page will be loaded here dynamically from /settings/ route -->
</div>
路由数组:
routes = [
{
path: '/',
url: '../pages/index.html',
},
{
path: '/about/',
url: '../pages/about.html',
},
{
path: '/catalog/',
componentUrl: '../pages/catalog.html',
},
{
path: '/product/:id/',
componentUrl: '../pages/product.html',
},
......
]
【问题讨论】:
标签: javascript web-applications routes frameworks html-framework-7