Skip to content

Instantly share code, notes, and snippets.

@odoe
Created December 15, 2014 16:56
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 odoe/7d33bc9ccda0d389c232 to your computer and use it in GitHub Desktop.
Save odoe/7d33bc9ccda0d389c232 to your computer and use it in GitHub Desktop.
sample widget that loads xstyle component
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