Servigistics InService Customization > Customizing System Integrations > Adding Custom JavaScript Files
  
Adding Custom JavaScript Files
You can add additional angular libraries. You may need to do this as a result of AngularJS changes in the latest release. For more information, see AngularJS Changes in Servigistics InService.
Loading custom JavaScript files
To load a custom JavaScript file, follow these steps:
1. Place the file in the custom app directory: <WT_HOME>/codebase.war/delivery/custom/app. Be sure that the custom directory structure mirrors the delivery directory.
2. Require the file in customizations.js. For example if the file is delivery/custom/app/modules/myCustomModule.js then add this line to the required section of customizations.js: “custom/modules/myCustomModule” Note that “delivery/custom/app” is shortened to “custom”.
3. Minimize the client: <ANT_HOME>/bin/ant -f <WT_HOME>/codebase.war/delivery/minimize.xml minimize
Your file will now automatically load with the app.
Adding a dependency to the InService Angular module
If you wish to use an angular module that InService does not support out of the box you will first need to make sure the file uses RequireJS to require AngularJS. Structure the file like this:
define(
[
“angular”
],
function (angular) {
angular.module(“myCustomModule”) …..
}
);
Once the file requires AngularJS follow these steps to add it as a dependency:
1. Load the file using the above steps for Loading custom JavaScript files.
2. In the before function of customizations.js add the module as a dependency for the InService module: module.requires.push('myCustomModule');