Hi , I’m not sure it’s bug or not but after I put page.router.clearPreviousHistory(); on the 1st page then I go to the 2nd page then I swipe back It’s become blank page. but if I remove"page.router.clearPreviousHistory();" from the 1st page it’s working fine.
And also if I use link back It’s also fine.
here
app.js
var app = new Framework7({
// App root element
theme: ‘ios’,
root: ‘#app’,
// App Name
name: ‘My App’,
// App id
id: ‘com.myapp.test’,
// Enable swipe panel
panel: {
swipe: ‘left’,
},
// Add default routes
routes: [{
path: ‘/about/’,
url: ‘about.html’,
},
{
path: ‘/list/’,
url: ‘list.html’,
on: {
pageInit(e, page) {
page.router.clearPreviousHistory();
},
}
},
{
path: ‘/view/’,
url: ‘view.html’,
},
],
// … other parameters
});
var mainView = app.views.create(’.view-main’);
for other page I just use
<div data-name="about" class="page">
<!-- Top Navbar -->
<div class="navbar">
<div class="navbar-bg"></div>
<div class="navbar-inner">
<div class="left">
<a href="#" class="link back">back</a>
</div>
<div class="title">ABOUT</div>
<div class="right">
<a href="#" class="link">Right Link</a>
</div>
</div>
</div>
<!-- Bottom Toolbar -->
<div class="toolbar toolbar-bottom">
<div class="toolbar-inner">
<!-- Toolbar links -->
<a href="#" class="link">Link 1</a>
<a href="#" class="link">Link 2</a>
</div>
</div>
<!-- Scrollable page content -->
<div class="page-content">
<p>Page content goes here</p>
<!-- Link to another page -->
<a href="/view/">link page</a>
</div>
</div>