title: Angular (click) on anchor tag is not working
body: <p>I am trying to use <code>(click)</code> but for some reason it's not working. I don't know what I am doing wrong. </p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;div *ngFor="let test of this.testingImages&gt;
     &lt;a (click)="test()"&gt;
        &lt;img src="test.jpg"&gt;
     &lt;a&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>In the Component:</p>
  
  <pre class="lang-js prettyprint-override"><code>test(): void
  {
     console.log("clicked");
  }
  </code></pre>