Html 在具有角度的列单元格中使用计算值进行表格排序

Html 在具有角度的列单元格中使用计算值进行表格排序,html,angularjs,Html,Angularjs,我想知道如何在已计算的列单元格上对表进行排序 例如,在下表中,如何对TCD列进行排序,以便在表的顶部显示最低值?由于单元中有一个计算,我不知道该怎么做 <table class="table table-striped table-hover"> <thead> <th>MD</th> <th>TCD</th> </thead> <tbody> <tr ng-repeat="product i

我想知道如何在已计算的列单元格上对表进行排序

例如,在下表中,如何对TCD列进行排序,以便在表的顶部显示最低值?由于单元中有一个计算,我不知道该怎么做

<table class="table table-striped table-hover">
<thead>
<th>MD</th>
<th>TCD</th>
</thead>
<tbody>
<tr  ng-repeat="product in selectedProductPrices">
    <td>£{{ product.RecurringCost  | number:2}}</td>
    <td>£{{ product.OneOffCost + product.OneOffCostMargin + ((product.RecurringCost + product.RecurringCostMargin) * productAttributesObj.Term) | number:2}}</td>
</tr>
</tbody>

医学博士
经颅多普勒
英镑{产品重复成本|编号:2}
{product.OneOffCost+product.OneOffCostMargin+((product.RecurringCost+product.RecurringCostMargin)*productAttributesObj.Term)|编号:2}
您需要自定义orderBy 范例

<tr  ng-repeat="product in selectedProductPrices|orderBy:myValueFunction">
$scope.myValueFunction = function(product) {
   return product.OneOffCost + product.OneOffCostMargin + ((product.RecurringCost + product.RecurringCostMargin) * productAttributesObj.Term);
};