Created
December 15, 2014 16:56
-
-
Save odoe/7d33bc9ccda0d389c232 to your computer and use it in GitHub Desktop.
sample widget that loads xstyle component
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
define([ | |
'require', | |
... | |
'./model', | |
'text!./templates/mywidget.tpl.html', | |
'xstyle/css!./css/mywidget.css' | |
], function( | |
require, | |
declare, lang, | |
_WidgetBase, _TemplatedMixin, | |
domClass, model, | |
template | |
) { | |
return declare([_WidgetBase, _TemplatedMixin], { | |
templateString: template, | |
postCreate: function() { | |
model.setParams(lang.mixin({ | |
map: this.get('map') | |
}, this.get('settings'))); | |
}, | |
startup: function() { | |
require(['xstyle/main'], function(){}); | |
} | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment