title: angular remove element from dom if src does not exist
body: <p>I have an img element with a ng-src attribute that will show / hide if the models image value exists, something like the following:</p>
  
  <pre><code>&lt;img ng-show="model.image" ng-src="img/{{model.image}}"/&gt;
  </code></pre>
  
  <p>which works fine. But it obviously still makes a GET request to the server for "...img/" when no image value exists. How can I stop it from making this request? I guess I need to conditionally remove the element from the DOM and should be placing my DOM manipulation in a directive but I'm not sure exactly how to approach this. Cheers.</p>