Business Console 10.7 | webMethods Business Console Documentation | Developing Gadgets for Business Console | Programming Gadgets | Reusing JS Files and CSS Files Across Gadgets
 
Reusing JS Files and CSS Files Across Gadgets
The JS files and CSS files added to the gadgetDefintion.xml are also globally available for use in other gadgets. All JS files are included in the common gadget-framework.js file, and the CSS files are included in gadget-framework.scss file.
For AngularJS modules, to use modules of other gadgets, set the dependencies to the modules of other gadgets.
var GadgetOne_Controller = function($scope) {

this.userDefinedFunctionOne = function() {
console.log("from userDefinedFunctionOne function of mygadget");
}


this.userDefinedFunctionTwo = function() {
console.log("from userDefinedFunctionTwo function of mygadget"); }
}
}

var gadgetOne_Controller= new GadgetOne_Controller(); // NOTE THE
DIFFERENT CASES