How to Compare value while printing with AngularJS.
Like {{campaignOverview.TotalMailSent | number} > 0 }
Al i want to do is to compare the Total mail sent with 0 and the print "N/A" if 0 else the value it self.
Thanks in advance.
How to Compare value while printing with AngularJS.
Like {{campaignOverview.TotalMailSent | number} > 0 }
Al i want to do is to compare the Total mail sent with 0 and the print "N/A" if 0 else the value it self.
Thanks in advance.
You can pass parameters to your filter with the : symbol
{{campaignOverview.TotalMailSent | number:0}}
number would then be a filter that performs your formatting logic of "N/A" if zero, or otherwise self.
| indicates a filter) then the documentation on Creating a Filter (docs.angularjs.org/guide/…) is probably the best place to start.