我想使用一些角度内建机制抛出标准的确认对话框(如下所示)点击动作按钮内的材料设计,而不创建额外的组成部分。
我试过下面的代码,但没用(
<mat-cell class="action" *matCellDef="let row">
<button *ngIf="!row.completedOrDiscard" class="discard-build-order" mat-button (click) = "discardBuildOrder(row.buildOrderId)" confirm="Are you sure you want to Discard the build order?">Discard</button>
</mat-cell>
我也试过了,什么都没发生
<mat-cell class="action" *matCellDef="let row">
<button *ngIf="!row.completedOrDiscard" class="discard-build-order" ng-confirm-click="Are you sure you want to Discard the build order?" ng-click = "discardBuildOrder(row.buildOrderId)" >Discard</button>
</mat-cell>