When I use in Requirejs module productType.js something like
$("#spa-cntr").panel({
href : '/xxx/forms/productType.html',
onLoad : function() {}
});
I can't write in productType.html nothing like
<div data-options="iconCls:'icon-add'" onclick="productType.newNode()">New
Node</div>
Error in Chrome looks like
Uncaught ReferenceError: productType is not defined
I think because parser doesn't put execution of js code there in scope of module.
Everything works fine with
$('#btn').bind('click', newNode());
or putting module itself in global context
window.productType = this;
but is there another way to work with isolated in module functions in html?