|
Title: Requirejs vs data-options, on-click etc. Post by: bbones on September 04, 2015, 04:06:07 AM When I use in Requirejs module productType.js something like
Code: $("#spa-cntr").panel({I can't write in productType.html nothing like Code: <div data-options="iconCls:'icon-add'" onclick="productType.newNode()">New Quote 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 Code: $('#btn').bind('click', newNode());or putting module itself in global context Code: window.productType = this; |