app/modules/main/directives/helpers/mdtSelectAllRowsHandlerDirective.js
(function(){
'use strict';
function mdtSelectAllRowsHandlerDirective(){
return {
restrict: 'A',
scope: false,
require: '^mdtTable',
link: function($scope, element, attrs, ctrl){
$scope.selectAllRows = false;
$scope.$watch('selectAllRows', function(val){
ctrl.dataStorage.setAllRowsSelected(val, $scope.isPaginationEnabled());
});
}
};
}
angular
.module('mdDataTable')
.directive('mdtSelectAllRowsHandler', mdtSelectAllRowsHandlerDirective);
}());