I have a list of dates coming from API and one such date is like "2017-07-05T10:53:24.000Z"
Am displaying dates in first column in datatable. In controller am defining the column like
$scope.dtColumnDefs = [
DTColumnDefBuilder.newColumnDef(0).withOption('type', 'date'),
DTColumnDefBuilder.newColumnDef(1).notSortable(),
....
];
HTML
<table datatable="ng" dt-options="dtOptions" dt-column-defs="dtColumnDefs">
<thead>
<tr class="table-header-color-yellow">
<th class="table-head-style">Date</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="review in reviews">
<td>{{review.date | date}}</td>
</tr>
</tbody>
</table>
How can i sort the dates in descending order as it is sorting in ascending order as of now?