<img src="img/temp.png" class="img-responsive" ng-if="series === 'Temperature' || series === 'T' || series === 'Temperature-138828'">
I tried like this, but it didn't work:
<img src="img/temp.png" class="img-responsive" ng-if="series === ('Temperature' || 'T' || 'Temperature-138828')">
Is there a way to shorten this <img>
tag (such as to compare series with multiple values or something else?). I haven't used angularjs a lot, so any advice would be appreciated.
Try like this:
<img src="img/temp.png" class="img-responsive" ng-if="['Temperature', 'T', 'Temperature-138828'].indexOf(series) > -1">