What might be the best possible condition for checking and displaying if the image path is undefined in AngularJS. I tried like this:
HTML:
<div ng-src="{{imageUrl}}" == "null" || src="img/avatar.png" >
CONTROLLER:
$scope.imageUrl="125.178.1.127/uploads/image" +$scope.imageName;
If $ scope.imageName is undefined, I need to load / show the default image img/avatar.png
source
share