title: angular2 onError image binding
body: <p>I'm wondering if we can bind or interpolate the onError on the image tag using angular2, </p>
  
  <p>on the app.component.ts:</p>
  
  <pre><code>imageUrl:string;
  
    constructor( ) {
        this.imageUrl = 'graphics/placeholder.gif';
     }
  </code></pre>
  
  <p>on the app.component.html:</p>
  
  <pre><code>&lt;img class="img-responsive" [src]="'graphics/image-1.jpg'" onError="imageUrl"/&gt;
  </code></pre>
  
  <p>The method below works.</p>
  
  <pre><code>&lt;img class="img-responsive" [src]="'graphics/image-1.jpg'" onError="this.src='graphics/placeholder.gif'"/&gt;
  </code></pre>
  
  <p>But as we using a many images on the app and I would like to make it a simple dynamic solution, I found this answer as well, </p>
  
  <p><a href="https://stackoverflow.com/questions/36429903/angular-2-check-if-image-url-is-valid-or-broken">Angular 2 - Check if image url is valid or broken</a></p>
  
  <p>but for some reason is not working, I don't know what I'm doing wrong here</p>