title: Replace with default image if image not found -angularjs
body: <p>What could be the best possible condition to check and display if the image path is undefined in AngularJS.
  I have tried like this:</p>
  
  <pre><code>HTML:
  &lt;div ng-src="{{imageUrl}}" == "null" || src="img/avatar.png" &gt;
  
  CONTROLLER:
  $scope.imageUrl="125.178.1.127/uploads/image" +$scope.imageName;
  </code></pre>
  
  <p>If $scope.imageName is undefined I have to load/show the default image <code>img/avatar.png</code></p>