I use ng-repeat
to display a list of tasks:
<div class="task_container" ng-repeat="task in tasks | orderBy:weigth(task)">
<span >Task:<span><br><span>{{task.label}}</span>
</div>
Each task has some properties, and I have defined a weight function that sums up these properties:
function weight(task)
{
var weight_value = task.priority - task.difficulty + task.interest;
return weight_value;
}
However, when displaying the page, the tasks are not ordered at all.
Is there a better/correct way to achieve that ?