1 ng.module('smart-table')
2 .directive('stPipe', ['stConfig', '$timeout', function (config, $timeout) {
10 pre: function (scope, element, attrs, ctrl) {
12 var pipePromise = null;
14 if (ng.isFunction(scope.stPipe)) {
15 ctrl.preventPipeOnWatch();
16 ctrl.pipe = function () {
18 if (pipePromise !== null) {
19 $timeout.cancel(pipePromise)
22 pipePromise = $timeout(function () {
23 scope.stPipe(ctrl.tableState(), ctrl);
24 }, config.pipe.delay);
31 post: function (scope, element, attrs, ctrl) {