stylingCtrl.js 386 Bytes Raw Blame History Permalink 1 2 3 4 5 6 7 8 9 10 11 12 13 14 'use strict'; angular.module('newApp') .controller('stylingCtrl', function ($scope) { $scope.$on('$destroy', function () { $('table').each(function () { if ($.fn.dataTable.isDataTable($(this))) { $(this).dataTable({ "bDestroy": true }).fnDestroy(); } }); }); });