0

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?

Muhammad Faizan Uddin
  • 1,339
  • 12
  • 29

1 Answers1

1

Sometimes third party libraries have limitations which you would not have locally.

When it is not possible to change the source code of that particular project, you might be better off by incurring a small stylistic penalty in your own code, so that you can integrate with the other software.

In this case, if you cannot change the configuration to omit the space, you could change your own template name to '/tree ', which will have an unnecessary space after your template name, but should be called on properly through BPM.

Daniël Camps
  • 1,737
  • 1
  • 22
  • 33