Ext JS 4上的代理Api错误
Proxy Api error on Ext JS 4
我刚开始玩Ext JS 4,接下来用Ext JS创建MVC应用程序。文章URL位于http://www.sencha.com/learn/the-mvc-application-architecture/.但当我在Chrome上运行应用程序时,它显示了错误。Chrome表示:"您正在使用ServerProxy,但尚未为其提供url。",但该应用程序在Firefox和Safari上运行良好。有人能告诉我如何修复这个bug吗?
Ext.define('AM.store.Users', {
extend: 'Ext.data.Store',
model: 'AM.model.User',
autoLoad: true,
autoSync: true,
proxy: {
type: 'ajax',
api: {
read: 'data/users.json',
update: 'data/updateUsers.json'
},
//url: 'data/users.json',
reader: {
type: 'json',
root: 'users',
successProperty: 'success'
}
}
});
谢谢。
@andriansandi
您是在web服务器上运行还是仅作为文件运行?如果您从文件加载html,则问题可能是由安全异常引起的。
如果在创建新模型时发生这种情况,请尝试将创建url添加到您的配置中,如下所示:
api: {
read: 'data/users.json',
update: 'data/updateUsers.json',
create: 'data/updateUsers.json'
}
遇到了同样的问题,但添加create:"data/updateUsers.json"可以解决问题,不确定其是否正确
相关文章:
- 如何更改bigquery API中的计费层选项
- Amazon S3 REST API大小不正确
- 客户端服务器REST API captcha实现
- 使用Facebook live API创建实时视频对象时的隐私设置
- 谷歌放置API:按国家或餐馆名称搜索餐馆
- MeteorJS:在带有回调的vzaar api上正确使用wrapAsync
- 通过本地网址代理谷歌街景 JS API
- REST API:基于用户代理的客户端(应用)授权
- 使用Tor api制作一个匿名代理服务器
- Ext JS 4上的代理Api错误
- 可以't使Last.FM API PHP代理运行
- 如何将Moment.js与Apigee API代理一起使用
- 使用crud存储代理api中的Extjs变量
- 什么是用户代理字符串(github api)
- 是否有可能通过反向代理在我的应用程序连接谷歌地图API
- 铬.Firefox web扩展的代理API
- 使用环回作为响应重构的API代理
- 如何使用php身份验证脚本作为CouchDB的代理,同时仍然保持完整的REST API功能?
- 在代理后使用NodeJS Quandl API
- Ruby on Rails 通过代理使用 JavaScript 发布到 API