Business Console 10.7 | webMethods Business Console Documentation | Developing Gadgets for Business Console | Communicating Between Gadgets | Connecting Multiple Views with Controller | Invoking a Function on a Controller
 
Invoking a Function on a Controller
1. Define a scope function under the defineScope block in the controller.
defineScope : function() {
...
this.$scope.myFunction= function() {

//DO SOMETHING
}
....
},
2. Invoke the function on the scope directly on user action or based on some business logic.
<button data-ng-click="myFunction()"> value="CLICK ME!"
// INVOKES THE FUNCTION myFunction defined on $scope on user click
</button>