Closed hassan-haghi closed 4 years ago
Hello It does not work when the button needs to be confirmed. for example:
<button type="button" mat-raised-button class="warn" (click)="deleteRequest(request)" [promiseBtn]="submitSubscription"> Delete </button> deleteRequest(request): void { this.confirmDialogRef = this.matDialog.open(ConfirmDialogComponent, { disableClose: false, data: { title: 'Confirm', message: 'Are you sure you want to deletethis request?' } }); this.confirmDialogRef.afterClosed().subscribe(result => { if (result) { this.confirmDelete(request.requestId); } this.confirmDialogRef = null; }); } private confirmDelete(requestId): void { this.submitSubscription = this.requestService.delete(requestId) .subscribe(resp => { ....... }); }
Hey hey. Could you maybe provide a plunkr or stackblitz? Not really sure what is going on in the example you provided :)
Hello It does not work when the button needs to be confirmed. for example: