JSONP request issue with Sencha Touch 2.1.1

2019-08-30 09:28发布

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条回答
疯言疯语
2楼-- · 2019-08-30 09:59

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.

查看更多
登录 后发表回答