JSONP request issue with Sencha Touch 2.1.1

僤鯓⒐⒋嵵緔 提交于 2019-12-12 02:44:12

问题


According to Sencha Touch 2.1 documentation, you make a json request with the following method Ext.data.JsonP.request(). When I use it I get: "Uncaught TypeError: Cannot call method 'request' of undefined". I get the same error whith Ext.util.JSONP.request().

How to make a jsonp request with Sencha Touch 2.1.1 ?


回答1:


I guess you have not imported required classes. To work with Ext.data.JsonP.request, you need to add a require like requires:['Ext.data.proxy.JsonP'] in corresponding class. I simply prefer to add require inside app.js itself.



来源:https://stackoverflow.com/questions/14661230/jsonp-request-issue-with-sencha-touch-2-1-1

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!