Skip to content

Instantly share code, notes, and snippets.

@pphetra
Last active December 18, 2015 17:39
Show Gist options
  • Select an option

  • Save pphetra/5820041 to your computer and use it in GitHub Desktop.

Select an option

Save pphetra/5820041 to your computer and use it in GitHub Desktop.
store = Ext.create('Ext.data.Store', {
fields: [
'id',
'model',
'brand'
],
proxy: {
type: 'ajax',
url: '/sagi/service/car',
reader: {
type: 'json',
root: 'data',
idProperty: 'id'
}
}
});
store.load({
callback: function(records, operation, success) {
if (success) {
console.log(records)
} else {
console.log('server reported an error')
}
}
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment