问题:framework7使用pushState后url依然没有变化
初始化代码:
var myApp = new Framework7({
pushState : true,
});
// Export selectors engine
var $$ = Dom7;
// Add view
var mainView = myApp.addView('.viewmain', {
});
模板结构代码 index.html:
<div class="views">
<!-- 主视图 -->
<div class="view viewmain">
<div class="pages">
<!-- Page, "data-page" contains page name -->
<div data-page="index" class="page">
<div class="page-content">
<a href="detail.html">detail</a>
</div>
</div>
</div>
</div>
</div>
detail.html代码:
<div class="pages">
<!-- Page, "data-page" contains page name -->
<div data-page="detail" class="page">
<div class="page-content">
detail detail
</div>
</div>
</div>
知道问题了,需要把主视图的class viewmian改为view-main,这个class是固定的不能变