材料2 md表按日期排序不起作用

时间:2018-05-22 10:21:26

标签: angularjs angularjs-material

<table md-table md-progress="promise" style="margin-top: -12px">
    <thead md-head  md-order='item.DateCreated'">
        <tr md-row>
           <th md-column style="min-width: 138px;"  md-order-by='item.DateCreated'>Date</th>
           <th md-column ng-show="vm.showComments !== vm.POSNotes && vm.showComments !== vm.TelemarketingNotes">Code</th>
           <th md-column ng-show="vm.showComments !== vm.POSNotes && vm.showComments !== vm.TelemarketingNotes">Description</th>
           <th md-column>Note</th>
           <th md-column style="min-width: 100px;"></th>
        </tr>
   </thead>
   <tbody md-body>
        <tr md-row ng-if="item" ng-repeat="item in vm.showComments | orderBy:'item.DateCreated':true">
           <td md-cell  ng-if="item.MemoCode==='MSS'|| item.MemoCode==='ADMIN' || item.MemoCode==='MEMBERSVC' || item.MemoCode==='BILLING'">{{ item.DateCreated | date: 'mediumDate' }}</td>
           <td md-cell ng-if="!(item.MemoCode==='MSS'|| item.MemoCode==='ADMIN' || item.MemoCode==='MEMBERSVC' || item.MemoCode==='BILLING')">{{ item.noteDateCreated | date: 'mediumDate' }}</td>

通过使用材料表,我想按DateCreated字段对数据进行排序。但是排序不能正常工作

0 个答案:

没有答案