Rumah > Soal Jawab > teks badan
问题:framework7使用pushState后url依然没有变化
初始化代码:
var myApp = new Framework7({
pushState : true,
});
// Export selectors engine
var $$ = Dom7;
// Add view
var mainView = myApp.addView('.viewmain', {
});
模板结构代码 index.html:
<p class="views">
<!-- 主视图 -->
<p class="view viewmain">
<p class="pages">
<!-- Page, "data-page" contains page name -->
<p data-page="index" class="page">
<p class="page-content">
<a href="detail.html">detail</a>
</p>
</p>
</p>
</p>
</p>
detail.html代码:
<p class="pages">
<!-- Page, "data-page" contains page name -->
<p data-page="detail" class="page">
<p class="page-content">
detail detail
</p>
</p>
</p>