When repeating data with ng repeat, I encountered an issue where some of the data.image (src) values were null and I did not want them to be included in the repeat process.
To solve this issue, I implemented a simple ng-if statement.
<div ng-repeat="data in data">
<div class="ImageContainer">
<img ng-src="{{::data.image}}" ng-if="data.image != null" />
</div>
<div class="LabelContainer">
<p>
{{::data.label}}
</p>
<div>
<div>
However, I realized from debugging that this approach added around 500 watchers. Are there any alternative methods to achieve the same result without using ng-if or a complex JavaScript function?