Having
<div class="item" data-ng-repeat="course in courses | filter:filterCourses | orderBy:predicate">...
and
$scope.predicate = function(course) {
//$scope.orderProp
};
what code do I need to put inside the predicate so I can
- order the same way the default orderBy:predicate will order(not sure if this makes sense)
- place empty course.StartDate at the end of the list
Notes:
- course is an Object with different properties like title, startDate, code
- $scope.orderProp contains the value to sort by: title, startDate, code. When startDate is empty I would like to place those items at the end of the list but still keep sorting by date properly, start date is an "integer" that I later display with ng-date in nicer form
Thank you
Answer: Here's what I ended up with http://jsfiddle.net/3hz2j8j7/
orderBydocs?