我有一个使用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]}}
的任何想法?