Skip to content

Instantly share code, notes, and snippets.

@mteece
Created December 21, 2011 16:32
Show Gist options
  • Save mteece/1506678 to your computer and use it in GitHub Desktop.
Save mteece/1506678 to your computer and use it in GitHub Desktop.
Object oriented Javascript with ExtJS.
// Object oriented Javascript with ExtJS
Ext.namespace('App.stub');
App.stub.MyObject = Ext.extend(Object, {
prop1: 'some string',
prop2: 100,
prop3: {
month: 10,
year: 1980
},
constructor: function(config){
Ext.apply(this, config);
},
getProp1: function(){
return 'prop1 is ' + this.prop1;
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment