Reputation: 5230
How do I set a placeholder
for an image in img
in AngularJS
? In my app I am dynamically setting an image using ng-src
.
Upvotes: 1
Views: 260
Reputation: 171669
Can use an OR in expression:
ng-src="{{myModel.avatar || placeHolderVariable}}"
Upvotes: 2