You can do any of these three things:
templateOptions: {
onChange: function($viewValue, $modelValue, $scope) {
//implement logic here
};
}
OR
templateOptions: {
onChange: callMe()
},
controller: function($viewValue, $modelValue, $scope) {
$scope.callMe = function() {
};
}
OR
templateOptions: {
onChange: ''
},
expressionProperties : {
'templateOptions.onChange': function($viewValue, $modelValue, $scope) {
};
}
MattE source
share