As I iterate through a list of objects in an ng-repeat, I am facing the challenge of sorting them based on their 'approved' attribute. The possible values for 'approved' are 'APPROVED', 'DENIED', or 'PENDING'. My goal is to have items with 'PENDING' status appear first, followed by 'APPROVED', and then 'DENIED'. Alphabetical sorting does not give me the desired result, and I am uncertain if there is a way to specify a custom order for sorting using orderBy. Currently, the sorting is done alphabetically and by date:
orderBy: ['approved', 'date']
Is there any workaround or method to utilize orderBy to achieve this specific sorting order?
Thank you.