Skip to content

Instantly share code, notes, and snippets.

@ahhqcheng
Created August 15, 2013 01:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ahhqcheng/6237465 to your computer and use it in GitHub Desktop.
Save ahhqcheng/6237465 to your computer and use it in GitHub Desktop.
Ext.data.Store
Ext.define('User', {
extend: 'Ext.data.Model',
fields: [
{name: 'firstName', type: 'string'},
{name: 'lastName', type: 'string'},
{name: 'age', type: 'int'},
{name: 'eyeColor', type: 'string'}
]
});
var myStore = Ext.create('Ext.data.Store', {
model: 'User',
proxy: {
type: 'ajax',
url: '/users.json',
reader: {
type: 'json',
root: 'users'
}
},
autoLoad: true
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment