Reputation: 2235
I have just created the default sample app using Sencha Touch 2 by the command
sencha app create FirstApp D:/Sencha/MyFirstApp all
I tried running the index.html but it keeps showing only the progress bar in my chrome and not the default page.
Upvotes: 2
Views: 797
Reputation: 802
I was facing the same problem, and had to do a lot of research before I got to the solution. I'm using sencha touch 2 and running it on IIS server 7. IIS by default does not serve JSON files. So in my Chrome console IIS was returning a file not found (404). Once I added JSON MIME type, and handler mapping to IIS it all started working perfectly. If You're using IIS too you can follow the following instructions to add mime type and handler mapping for JSON to IIS.
Click Add
. (for me this was on the right panel in windows 7)
Go back to server properties.
Click Add a Script Map
Restart Server and your website, to get it working
Hope this helps :)
Upvotes: 2
Reputation: 3850
By default sample applications creates in development or as Sencha names 'microloader' mode. That means you do not load the sencha-touch.js at the startup, but all classes both from your app and from core Ext are loaded async from the sdk folder. To run in microloader mode you have to wire up the local http server. Like xampp or other. After than copy (or better link) your sources to htdocs folder and run app in browser via http://localhost/path/to/you/MyFirstApp
Cheers, Oleg
Upvotes: 0