Business Console 10.11 | webMethods Business Console Documentation | Developing Gadgets for Business Console | Introduction to Business Console | Understanding AngularJS and Non-AngularJS Gadget Development
 
Understanding AngularJS and Non-AngularJS Gadget Development
AngularJS is a client-side web application framework supported by Google, enables you to create Single Page Applications (SPA). AngularJS framework adapts and extends traditional HTML to present dynamic content through two-way data-binding that allows automatic synchronization of models and views.
AngularJS is built on a declarative programming model that places markers known as directives on the Document Object Model (DOM). DOM element manipulation is against the construct of AngularJS, but AngularJS allows DOM manipulation with the use of custom directives.
Non-AngularJS frameworks that support imperative programming model such as JQuery, allow remote selection of DOM elements, and manipulation of DOM elements. However, using element IDs for DOM selection and manipulation might not always be the best approach. For example, if a single gadget is embedded multiple times in a page, and if you use element IDs for DOM selection, only the first gadget in the DOM would be selected, and would ignore other gadgets. When a gadget is used multiple times in a single page, it helps to use AngularJS custom directives because the custom directives automatically pass the respective element references to the directives link function.
You should consider the differences between AngularJS framework and non-AngularJS framework, and choose either a non-AngularJS (imperative) approach or AngularJS (declarative) approach for developing gadgets. If you decide to use JQuery or any other alternatives for DOM manipulation, use AngularJS directives for DOM elements.
We recommend that you use AngularJS for developing gadgets.