I’m making an ios app with framework7 and Cordova, but when I convert it to Cordova for some reason, the processing specified in “pageInit” and “pageAfterIn” of the first page is not executed.
The following is a script file
var app = new Framework7({
root: '#app',
theme: 'ios',
name: 'foo',
id: 'foo',
cache:false,
cacheDuration: 0,
iosSwipeBack:false,
preloadPreviousPage:false,
view: {
iosSwipeBack: false,
xhrCache: false
},
routes: [
{
path: '/',
url: './index.html',
name: 'home',
on: {
pageAfterIn: function(){
console.log('pageInit')
},
pageInit: function(){
console.log('pageAfterIn')
}
}
}
]
});
In addition, I started the build-in server of php by setting only Cordova source (/cordobaAppName/www
) as a separate project for investigation and it behaved as follows.
When I accessed localhost:8080
=> Works without problems
When I accessed localhost:8080/index.html
=> Don’t works
The URL will be localhost: 8080 /index.html
automatically when you build a build-in server in a Cordova project, so it does not work if /index.html is included in the URL found by testing on the php build-in server If you can solve the problem, I think Cordova’s app will work without problems.