title: How to set a default image in an ionic app
body: <p>I'm trying to add a default image to an <strong>ionic</strong> app. Currently I'm getting images inside the app through a link which is in the rows of the tables in the <strong>database</strong>. However if the image does not exist anymore or the link is broken I want the app to display a <code>default/fall-back</code> image and not this default ripped apart painting icon.</p>
  
  <p>This is one of the methods I have tried getting it to work but it doesn't.</p>
  
  <pre><code>        &lt;ion-card transparent class="detailView" *ngFor="let act of activities"&gt;
          &lt;img class="img" src="{{act.image}}"
          onerror="this.src='assets/imgs/defualt.jpg';" alt = "Missing Image" /&gt;
  </code></pre>
  
  <p><strong><code>{{act.image}}</code></strong> talks to the database, to be precise to the activity table in the database and extracts the image links. How do I implement a default option if the image can't be displayed?</p>
  
  <p>A few extra tidbits; the app is written with <strong>Ionic</strong> Framework and implements the use of <strong>Typescript</strong>, <strong>Sass</strong> and <strong>Angular</strong>.</p>