使用SenchaTouch 2只显示进度条 [英] using SenchaTouch 2 keeps showing only the progress bar
问题描述
我刚刚使用Sencha Touch 2创建了默认的示例应用程序。
sencha应用程序创建FirstApp D:/ Sencha / MyFirstApp全部
我尝试运行index.html但它不断显示
我正面临同样的问题,必须做一个很多研究之前,我得到了解决方案。我使用sencha touch 2并在IIS服务器7上运行它。IIS默认情况下不提供JSON文件。所以在我的Chrome控制台中IIS正在返回一个找不到的文件(404)。一旦我添加了JSON MIME类型,并将处理程序映射到IIS,这一切都开始工作。如果您也使用IIS,您可以按照以下说明向JSON添加MIME类型和处理程序映射。
- 打开您的IIS管理员。
- 在服务器属性中,导航到Mime类型。
-
单击
添加
。 (对我来说,这是在Windows 7的右侧面板上)
- 将文件扩展名为:.json
- 将MIME类型设置为:application / x-javascript
-
返回到服务器属性。
- 导航到处理程序映射
-
单击
添加脚本映射
- 请求路径为:* .json
- 可执行文件为:C:\WINDOWS\system32\\设置名称为:JSON
-
重新启动服务器和您的网站,以使其正常工作
希望这有助于:)
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.
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.
- Open up your IIS manager.
- In the server properties, navigate to Mime Types.
Click
Add
. (for me this was on the right panel in windows 7)- Give File name extension as: .json
- set MIME Type to: application/x-javascript
Go back to server properties.
- Navigate to Handler Mappings
Click
Add a Script Map
- Give request path as: *.json
- Executable as: C:\WINDOWS\system32\inetsrv\asp.dll
- Set name to : JSON
Restart Server and your website, to get it working
Hope this helps :)
这篇关于使用SenchaTouch 2只显示进度条的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!