Below code will sort the list listLeaves in the descending order of date field .
$scope.listLeaves = $filter('orderBy')($scope.listLeaves, "-date")
$scope.listLeaves = $filter('orderBy')($scope.listLeaves, "-date")
Java, Python, Spring MVC, SpringBoot, SQL, MySQL, MariaDB, PostgreSQL and Back-end theory and code examples.