Multi-device Hybrid App Template + WinJS = buggy single page navigation
limefrogyank opened this issue · comments
I've been playing around with the Multi-device Hybrid App template (CTP2) and working on a single-page navigation style app using the WinJS UI. I'm calling a navigate function that loads HTML fragments into a root page... and these fragments contain other scripts that need to run. I've had very few problems making this run on Android and iOS, but Windows 8 and WP8 have given me no end of problems. I wasn't getting any errors thrown so it took a while but I managed at one point to make everything work on Windows by using path names that start with "./" and using path names completely relative to the current html document. (i.e. using lots of ../../folder/file.js style paths)
However, since upgrading to CTP3, this behavior is now gone... meaning the navigation is completely broken again. I began exploring potential problems and decided to comment out the winstore-jscompat.js file that is automatically included in the MDHA template. IT WORKED! I would like to keep using this shim because it fixes compatibility issues with other libraries, but for now it seems to not work well with the navigation model used by WinJS and the current MDHA template.
If needed, I can upload a sample solution that demonstrates this problem.
Copied from the issue from winjs listed above:
This is a Multi-Device Hybrid App solution that is setup for single page navigation. It currently has the winstore-jscompat.js reference commented out (in the merges/windows/scripts/platformOverrides.js file) so that it actually works.
To actually build the project for windows, you FIRST have to build it for Android to create the Debug bld folder. Then, you need to attempt to build the Windows version. It will fail with an expired key error. Follow the link below to get a new key, rename it, and copy it to the windows solution folder... build again and it will run.
Once you see it work, then try to uncomment the winstore-jscompat stuff to see what happens... nothing :)
Closing this one and we will track in winjs/winjs#718