2021-12-19 13:39:31 +00:00
|
|
|
define([
|
2021-12-19 19:31:34 +00:00
|
|
|
"require",
|
2021-12-19 13:39:31 +00:00
|
|
|
"dijit/_TemplatedMixin",
|
2021-12-19 19:31:34 +00:00
|
|
|
"dijit/_WidgetsInTemplateMixin",
|
2021-12-19 14:05:22 +00:00
|
|
|
"dijit/_AttachMixin",
|
2021-12-19 13:39:31 +00:00
|
|
|
"dijit/_WidgetBase",
|
2021-12-19 19:31:34 +00:00
|
|
|
"dojo/_base/declare",
|
|
|
|
"dijit/form/TextBox",
|
|
|
|
"./ChildWidget2"
|
|
|
|
], function(require, _TemplatedMixin, _WidgetsInTemplateMixin, _AttachMixin, _WidgetBase, declare) {
|
|
|
|
return declare("app/widgets/MainWidget", [_WidgetBase, _AttachMixin, _TemplatedMixin, _WidgetsInTemplateMixin], {
|
|
|
|
contextRequire: require,
|
2021-12-19 14:05:22 +00:00
|
|
|
templateString: "<div>"
|
|
|
|
// + "Hello World!!! <input data-dojo-type=\"dijit/form/TextBox\" />"
|
|
|
|
// this works as it's dijit
|
2021-12-19 19:31:34 +00:00
|
|
|
+ "<div data-dojo-type=\"./ChildWidget2\"></div>"
|
2021-12-19 14:05:22 +00:00
|
|
|
// this doesn't work as it's trying to fetch ./node_modules/dojo/ChildWidget which seems to be
|
|
|
|
// relative to dojo/parser dojo/parser
|
|
|
|
+ "</div>"
|
2021-12-19 13:39:31 +00:00
|
|
|
});
|
|
|
|
});
|