lundi 4 janvier 2016

Show hide in angularJS if not empty

I have these two images

<img ng-show="cat1.PictureURIs[0].URI" src="{{cat1.PictureURIs[0].URI}}" />
<img ng-hide="cat1.PictureURIs[0].URI" src="/assets/img/placeholder.png">

Problem: If {{cat1.PictureURIs[0].URI}} not empty display first image else display second image. I use ng-show, ng-hide but not working.

Aucun commentaire:

Enregistrer un commentaire