I'm stuck with an anchor that sets the ng-href to a server-stored variable and let's say, 1 in 300 return a 404 and that source is out of my hands to control.
<div class="steam-slide">
<div class="steam-slide-poster-img-wrapper">
<a ng-if="!mobileType" class="steam-slide-poster-img" ng-href="{{steamer.portUrl}}">{{steamer.description}}</a>
<a ng-if="ismobileType" class="steam-slide-poster-img" ng-href="{{steamer.landUrl}}">{{steamer.description}}</a>
</div>
</div>
What happens is steamer.portURL sometimes returns a 404 and that crashes the whole template. I've written a 404 check server side but it takes too long and causes a timeout due to a large amount of records being requested. I also can't reduce that number. Is there a good way to check for the URL being 'good' and doing an ng-if or ng-switch so the template doesn't crash entirely?
Also I cannot call from Javascript because of CORS is in effect...
Thanks...