app/modules/main/directives/tablecard/mdtCardFooterDirective.js
(function(){
'use strict';
function mdtCardFooterDirective(){
return {
restrict: 'E',
templateUrl: '/main/templates/mdtCardFooter.html',
transclude: true,
replace: true,
scope: true,
require: ['^mdtTable'],
link: function($scope){
$scope.rowsPerPage = $scope.mdtPaginationHelper.rowsPerPage;
$scope.$watch('rowsPerPage', function(newVal, oldVal){
if(newVal !== oldVal){
$scope.mdtPaginationHelper.setRowsPerPage(newVal);
}
});
}
};
}
angular
.module('mdDataTable')
.directive('mdtCardFooter', mdtCardFooterDirective);
}());