Template7 Data Context lost after page back
Hi, I got the first page load as follows:
var frontpage = {todayStr: todayStr, todayRoster: todayRoster, chnName:roster.chnName, ...}; mainView.router.load({ url: 'app/today.html', reload: true, context: { frontpage: frontpage } }); Then, a page (leave) was invoked as follows: var showLeave = function () { mainView.router.load({ url: 'app/leave.html', context: { } }); } When page back, if is OK. However, if another page (leaveform) was invoke in the leave page as follows: var showSickLeave = function () { mainView.router.load({ url: 'app/leaveform.html', context: { sickleave: true, todaystr: todaystr } }); } Then, When page back, I got the follow error Unhandled exception at line 30, column 803 in eval code 0x800a138f - JavaScript runtime error: Unable to get property 'chnName' of undefined or null reference
** Where chnName is a context data used in the the today page instead of the leave page. ** I suppose the page back from the leaveform page will go back to the leave page. I don't know why the 'today' page was evaluated and the data-context is null.
Would be good how to replicate it more detailed, even better live example
I have the same issue. You can see it if you make more than 3 backs. Here is data when context is lost context.json.zip
I found that, in Framework7, Template7 cannot been applied more than 1 layer. Otherwise, the data in higher layers will be lost.
Context data isn't lost in history, it just wasn't shown in current page context. I hope It could be fixed easily.
Yes, this is a great issue ! Vladimir, you have any fix ?
I gave up to rely on template7 on the higher level pages. I used onpageinit callbacks to assign values to the higher level pages with javascript.
I'm using F7 with AngularJS. I tried to solve with page callbacks but without success (Page recompile isn't alternative in my project). I'm waiting Vladimir position about this.
Any update for this problem? I have the same and it's really blocking me :(
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.