I’m trying to find the best way to structure a large app into a set of js files and a set of ux files. I need a way to import/include these files into the main ux file. I’ve gone through most of the Fuse learning stuff and cannot figure out how properly consume these files. What’s wrong with the following:
<JavaScript File="utilities.js" ux:Global="MyModule" />
<JavaScript>
var myModule = require("MyModule");
</JavaScript>
then
<Button Text="Heita" Clicked="{myModule.print}"/>
the js file:
var Observable = require('FuseJS/Observable');
module.exports = {
function print() {
debug_log("Printing from js file");
}
};
Thanks for the help!