我剛剛開始播放Ext JS 4以及使用Ext JS 4創建MVC應用程序。文章URL爲http://www.sencha.com/learn/the-mvc-application-architecture/。但是當我在Chrome上運行應用程序時,它顯示錯誤。 Chrome說:「您使用的是ServerProxy,但沒有提供網址」,但該應用程序在Firefox和Safari上運行良好。誰能告訴我如何修復這個bug?Ext JS上的代理Api錯誤4
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
雖然你正在按照教程,但請發佈您的代碼 – adis 2012-02-17 09:01:57
請看我的商店/ Users.js代碼 – 2012-02-17 09:19:53
你可以嘗試註冊代理模型,而不是商店? – adis 2012-02-17 09:25:37