webMethods Business Console Documentation 10.5 | 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

Copyright © 2014-2019 | Software AG, Darmstadt, Germany and/or Software AG USA, Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors.