title: how to check if images from url is broken
body: <p>l am working on ionic 4  project . My project is getting data json from url . l want to check if images comes from url is broken or not . if is broken show another images . l am tried  different code but no one is working . </p>
  
  <p>what l am using code is  </p>
  
  <pre><code>   &lt;ion-row *ngFor="let item of items" justify-content-around test-center&gt;
  
  
            &lt;ion-col &gt;
                &lt;img src="/images/data/operators/{{item.flight.airline.code.icao}}_logo0.png"  onerror="this.src='images/data/operators/{{item.flight.airline.code.iata}}_{{item.flight.airline.code.icao}}.png'"&gt;
  
            &lt;/ion-col&gt;
  
  
          &lt;/ion-row&gt;
  </code></pre>
  
  <p>l got error when to run </p>
  
  <pre><code>ERROR Error: Uncaught (in promise): Error: Template parse errors:
  Binding to event property 'onerror' is disallowed for security reasons, please use (error)=...
  If 'onerror' is a directive input, make sure the directive is imported by the current module.
  </code></pre>
  
  <p>depending on error if l use <code>(error)=</code> l got another error is </p>
  
  <pre><code>ERROR Error: Uncaught (in promise): Error: Template parse errors:
  Parser Error: Got interpolation ({{}}) where expression was expected at column 69 in [this.src=
  </code></pre>
  
  <p>any solution please ? </p>