conditionally call a function on a button angular on click event code example
Example: conditional (click) action angular
<button [class]="index===0? 'btn white': 'btn'" (click)="link && goToStories()">
<button [class]="index===0? 'btn white': 'btn'" (click)="link && goToStories()">