prevent click angular code example

Example 1: prevent row click event when button is clicked angular html

clickStopper(event) {
      event.stopPropagation();
      return;
  }

Example 2: angular disable click

try like this

<button  [disabled]="isDisabled" (click)="btnClick.emit($event)">
        <ng-content></ng-content>
</button>

@Input() isDisabled: boolean = false;
@Output() btnClick = new EventEmitter();
Use Output and By default the button click event won't work if button is disabled. take advantage of it

<my-button [isDisabled]="isDisabled" (btnClick)="click($event)"> submit </my-button>