👁 View: stPipe.js
Path: /home/thiqat5/cargo.thiqatech.com/bower_components/angular-smart-table/src/stPipe.js
Size: 589 B · Modified: 2015-02-09 13:00:00 · Perm: 0644 · Writable
ng.module('smart-table')
    .directive('stPipe', function () {
        return {
            require: 'stTable',
            scope: {
                stPipe: '='
            },
            link: {
                pre: function (scope, element, attrs, ctrl) {

                    if (ng.isFunction(scope.stPipe)) {
                        ctrl.preventPipeOnWatch();
                        ctrl.pipe = function () {
                            return scope.stPipe(ctrl.tableState(), ctrl);
                        }
                    }
                }
            }
        };
    });