dashboard.component.ts
myFunction(){
console.log("test");
}
dashboard.component.html
<img [src]="team.logo" onclick="myFunction()" alt="img">
Whenever the image is clicked, error appears in console saying "Reference error: myFunction is not defined". I have tried using ng-click aswell but no luck.
(click)="myFunction()", have you tried that?ng-clickis the old angularJS (aka angular 1) syntax.