AngularJS libraries removed

Beginning with Platform 6, all AngularJS libraries have been removed from Itential Core. These removals will break any customizations that rely on AngularJS. Custom applications that depend on AngularJS for front-end components will need to be updated for each AngularJS library they use. Custom manual tasks will need to be refactored and self-hosted to remain functional.

The following UI libraries in /lib/angular are no longer available:

ui/lib/angular-animate
ui/lib/angular-app
ui/lib/angular-aria
ui/lib/angular-color-picker
ui/lib/angular-material-data-table
ui/lib/angular-material
ui/lib/angular-sanitize
ui/lib/angular

What should I do?

For any custom applications or manual tasks that rely on AngularJS, Itential recommends refactoring from AngularJS to React so that your application remains functional within Itential Platform.

Refactor your customization

There are two major aspects when refactoring to remove dependencies on the Itential Core AngularJS libraries. Your use case may fall into one of three scenarios: using AngularJS for a custom application, using AngularJS for a custom manual task, or both.

For custom applications, you have two options:

  • Migrate to React (recommended) — Migrate entirely from AngularJS to React or a React-based UI library. This is recommended for greater security hardening.
  • Self-host AngularJS — Continue using AngularJS and update your customization to self-host the utilized libraries.

For custom manual tasks, you must convert the task from AngularJS to React to remain functional in Platform 6.

Self-host AngularJS

If you wish to continue using AngularJS, follow these steps:

1

Update package.json

Verify if the custom application depends on the following packages. If so, add the corresponding lines to the package.json file:

1{
2 "dependencies": {
3 "angular": "1.5.11",
4 "angular-animate": "1.5.11",
5 "angular-aria": "1.5.11",
6 "angular-color-picker": "1.0.10",
7 "angular-material": "1.0.7",
8 "angular-material-data-table": "0.10.3",
9 "angular-sanitize": "1.5.11"
10 }
11}
2

Install dependencies

$npm install
3

Create a lib directory

Create a new directory at the application root to serve the AngularJS files:

$mkdir lib
5

Register the directory

In the pronghorn.json file of the application, add the new directory as a uiDirectory:

1"uiDirectories": ["lib"]
6

Update script references

Update any references to the old Itential Platform provided AngularJS instance to the new location:

$script(src="/lib/angular/angular.min.js") → script(src="./lib/angular/angular.min.js")

Convert custom manual tasks to React

Custom manual tasks that rely on AngularJS are no longer supported in Platform 6 and must be converted to React or a React-based UI library. All tasks must be converted entirely to React.

If you encounter any issues while refactoring or would like to request a template, contact the Product Support Team.