webMethods Business Console Documentation 10.5 | webMethods Business Console Documentation | Developing Gadgets for Business Console | Programming Gadgets | Base Controller for Programming Gadgets
 
Base Controller for Programming Gadgets
 
Functions Defined in Base Controller
AngularJS provides a MVC framework to manage the business logic of a gadget. The base logic for programming a gadget should reside in the controller.js. The gadget framework binds the controller to the view file dynamically at runtime so that you do not have to mention the controller explicitly in the view using the data-ng-controller attribute.
In the gadget development framework, we have included a base controller (BaseController.js) which wires some of the required services to the controller. As a best practice, all AngularJS controller for a gadget should extend base controller. Though JavaScript does not provide inheritance directly, you can use JavaScript prototype inheritance.
Extending base controller provides a way to overload some of the functions defined in it. Functions in base controller provide a structured coding approach.

Copyright © 2014-2019 | Software AG, Darmstadt, Germany and/or Software AG USA, Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors.