I have an ng repeat repeating data. - Some of data.image (src) is null, and those with src=null are not to be repeated.
I solved it with a simple ng-if.
<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>
but from debugging I noticed this cost me around 500 watchers. Any obvious way to accomplish what im trying without the ng-if or a major JS vanilla function ?
You can apply one way binding on ng-if that way you can reduce few more watchers.
I agreed with @DoctorMick, filter will reduce number for loop, watchers and it will be fast as well. But if you have some other data along with image and you want to show that data then it will not solve your purpose.