Hello,
I’m really sorry to create another topic but I really need to understand the Routes for correct menu navigation because I really love this framework7 and special thanks to Vladimir Kharlampidi for create this beautiful and simple framework .
My problem here is when I click on page link it’s working not correctly, just one link work correctly(‘searchcarrier.html’).
Thanks for help!
Here is my code:
<----- JS File -->
var $$ = Dom7;
var app = new Framework7({
root: "#app",
name: "Track My Parcel",
id: "com.hubeidev.trackmyparcel",
routes: [
{
path: 'aboutus',
url: './template/aboutus.html',
},
{
path: '/searchcarrier/',
url: './template/searchcarrier.html',
},
{
path: 'givefeedback',
url: './template/givefeedback.html',
},
{
path: 'contactus',
url: './template/contactus.html',
},
{
path: '/',
url: 'index.html',
}
],
});
var mainView = app.views.create(’.view-main’);
var leftPanel = app.panel.create({
el: ‘.panel-left’,
});
$$(’.mainMenu’).click(function(){
leftPanel.close(true);
});
<— HTML File ----->
<div class="list links-list">
<ul>
<li class="mainMenu">
<a href="/index/">Home</a>
</li>
<li class="mainMenu">
<a href="/searchcarrier/">Carrier List</a>
</li>
<li class="mainMenu">
<a href="/aboutus/">About Us</a>
</li>
<li class="mainMenu">
<a href="/givefeedback/">Give a feedback</a>
</li>
<li class="mainMenu">
<a href="/contactus/">Contact us</a>
</li>
</ul>
</div>
Thanks again!
Shahzad