I have been attempting to compare 2 dates in order to appropriately display data in a table. I have tried the following approach:
${this.dateToCompare.getTime()} > ${row.CreateDate.getTime()}
However, there is an issue where CreateDate has a null value on certain rows causing the above method to fail.
Another attempt I made was:
<div ng-if="${row.CreateDate!==null} && ${this.dateToCompare.getTime()} > ${row.CreateDate.getTime()}"
I am looking to first check if the row contains a null value or not. Even when it does contain a null value, the code continues after the && operator and results in a syntax error when reaching getTime() for dateToCompare, as it is being called on a null value.
Is it feasible to instruct ng-if to bypass running if the value is null and skip that particular row? What would be the most effective approach to resolve this issue and successfully run getTime() on the values? Thank you