I created a very simple template widget. Something like that:
function (declare, _WidgetBase, _TemplatedMixin, _WidgetsInTemplateMixin, ..., ...) {
return declare("widgets.some.Widget", [_WidgetBase, _TemplatedMixin, _WidgetsInTemplateMixin], {..
...
templateString: template,
widgetsInTemplate: true,
...
}
These widgets load and work fine. However, when I want to use it in another widget template, for example:
<div style="width: 400px" data-dojo-type="widgets.some.Widget" ... >
</div>
.. As a result, I get 2 errors:
Unable to read 'nodeType' property from null "
and
widgets.somewidgetusing.SomeWidget: the parser returned an empty promise (probably waiting for the module to load automatically), unsupported _WidgetsInTemplateMixin. Before creating an instance, you must first load all supporting widgets.
Both widgets work fine, but when I use widgets.some.Widgetin another widget, errors occur.
source
share