Closed oudoken closed 2 months ago
Hello There, Html layout it's configured with "stacked" pages.
Event like: pageMounted, pageInit, pageReinit, pageBeforeIn, etc. are fired when configured from the initialization of framework7 object but not when using the router like this:
view.router.navigate({name: 'my_page'}).once('pageInit',function(e){ console.log('do something'); })
This was working correctly on F7 v7. Also manipulating DOM elements BEFORE navigating to the page where the elements are it's not working anymore.
You can try with this code:
mainView.router.navigate({name: 'my_page'}) .once('pageMounted',function(e){ console.log('pageMounted'); }) .once('pageInit',function(e){ console.log('pageInit'); }) .once('pageReinit',function(e){ console.log('pageInit'); }) .once('pageBeforeIn',function(e){ console.log('pageBeforeIn'); }) .once('pageAfterIn',function(e){ console.log('pageAfterIn'); });
Only "pageAfterIn" will log in the console.
Not sure if can be addressed to DOM7 tought.
Thanks, Rob
Hello There, Html layout it's configured with "stacked" pages.
Event like: pageMounted, pageInit, pageReinit, pageBeforeIn, etc. are fired when configured from the initialization of framework7 object but not when using the router like this:
view.router.navigate({name: 'my_page'}).once('pageInit',function(e){ console.log('do something'); })
This was working correctly on F7 v7. Also manipulating DOM elements BEFORE navigating to the page where the elements are it's not working anymore.
You can try with this code:
mainView.router.navigate({name: 'my_page'}) .once('pageMounted',function(e){ console.log('pageMounted'); }) .once('pageInit',function(e){ console.log('pageInit'); }) .once('pageReinit',function(e){ console.log('pageInit'); }) .once('pageBeforeIn',function(e){ console.log('pageBeforeIn'); }) .once('pageAfterIn',function(e){ console.log('pageAfterIn'); });
Only "pageAfterIn" will log in the console.
Not sure if can be addressed to DOM7 tought.
Thanks, Rob