I included a standalone AngularJS project in IBM BPM by keeping all the project assets (html, css & js files) in resources (teamworks.war) and keeping the index.html and AngularJS's main controller in customHTML in BPM's coach view.
Routing file for AngularJS (app.js):
angular.module('demoApp', ['ui.tree', 'ngRoute', 'ui.bootstrap'])
.config(['$routeProvider', function($routeProvider) {
$routeProvider
.when("/tree", {
controller: "treeCtrl",
templateUrl: "template.html"
})
.otherwise({
redirectTo: '/tree'
});
}]);
BPM loads the AngularJS app again and again (using '/tree '
instead of '/tree'
as the template name) as seen from elements in developer tools in ng-view and ultimately the browser gets crashed.
Although the same AngularJS app works perfectly fine on browser independently (without being included in BPM).
How can this behaviour be avoided in BPM?