<span ng-hide="(getStatusIcon(inactive.currentStatus.code).statusDesc) =='Expired' ||
(getStatusIcon(inactive.currentStatus.code).statusDesc) =='Rejected' ||
(getStatusIcon(inactive.currentStatus.code).statusDesc) =='Refused'">
PO# [[inactive.poNumber]]
</span>
I am looking to enhance the code by optimizing it. If the getStatusIcon(inactive.currentStatus.code).statusDesc is 'expired', 'refused', or 'rejected', we should hide the span tag. Currently, the function is called three times. Is there a way to check if getStatusIcon(inactive.currentStatus.code).statusDesc is in ('expired', 'refused', 'rejected') and only call the function once?