如何为ng-table-dynamic添加自定义过滤器?

时间:2017-04-05 16:51:37

标签: angularjs ngtable

我有一个使用ngTable(ng-table-dynamic)的Angular 1.6应用程序。它工作得很好,但我无法想出一种方法来为行添加基本过滤器。我正从//same code as you used before, just make an onClick event for the NavItems instead of using Link <Nav pullRight> <NavItem eventKey={1} onClick={ e => this.props.history.push("/home") } > Home </NavItem> <NavItem eventKey={2} onClick={ e => this.props.history.push("/book") } > Book Inv </NavItem> </Nav> 转到ng-table 从:

ng-table-dynamic

为:

%table{ng-table: "$ctrl.tableParams"}
    %tr{ng-repeat: "unit in $data track by unit.id"}
        %td{data-title: "'name'", sortable: "'name'"}
            {{unit.name}}
        %td{data-title: "'cost'", sortable: "'cost'"}
            {{unit.cost | currency:"$":0}}

有关如何让该货币过滤器申请%table{ng-table-dynamic: "$ctrl.tableParams with $ctrl.columns"} %tr{ng-repeat: "unit in $data track by unit.id"} %td{ng-repeat: "col in $columns"} {{unit[col.field]}} 的任何想法?

0 个答案:

没有答案