Skip to content

Instantly share code, notes, and snippets.

@moduscreate
Created February 15, 2012 22:33
Show Gist options
  • Save moduscreate/1839532 to your computer and use it in GitHub Desktop.
Save moduscreate/1839532 to your computer and use it in GitHub Desktop.
Ext.setup({
onReady : function() {
var instance = Ext.create('MyModel', {
id : 'test'
});
console.log('onReady model instance', instance);
}
});
Ext.define('MyModel', {
extend : 'Ext.data.Model',
config : {
fields : [
{
name : 'id',
convert : function(v) {
return 'id ' + v;
}
}
],
proxy : {
type : 'memory'
}
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment