When using AngularJS
One interesting scenario I encountered is having a ng-change event on a text field and seeing the function being called correctly:
<input type="text" ng-model="toggleState" ng-change="ToggleGroupVisiable()" data-rule"" />
The question that arises is how to access the value of the text box that is being changed within the function ToggleGroupVisiable() that is triggered upon changes.
$scope.ToggleGroupVisiable = function () {
... some code ...
}