Skip to content

Instantly share code, notes, and snippets.

@odoe odoe/widget.js

Created Dec 15, 2014
Embed
What would you like to do?
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
You can’t perform that action at this time.