Calling Angular Controller function using text button in TableTools
Calling Angular Controller function using text button in TableTools

I have the following setup
$(document).ready(function () {
$('#modalityGrid').dataTable({
"sDom": '<"clear">T<"clear">lfrtip',
"oTableTools": {
"aButtons": [
{
"sExtends": "text",
"sButtonText": "Add New",
"fnClick": function (nButton, oConfig, oFlash) {
$scope.loadAddPage();
}
}
]
}
});
});
I want to fire an Angular controller function (loadAddPage) after the user clicks the 'Add New' button.
I get an error telling me that loadAddPage is undefined
Can anyone advise me on how to do this
Thanks
jd