How can I call function loadTable from another controller?
app.controller('tableCtrl', ['$scope', function (scope) {
scope.loadTable = function() {
//some code
};
});
app.controller('secondCtrl', ['$scope', function (scope) {
scope.buttonClick = function() {
//call loadTable from tableCtrl
};
});