angular - 单击角度 12 中的每个 formArray 元素后,如何禁用 formArray 的特定单击事件?
问题描述
<div formArrayName="addGrp">
<div id="ifElse_block" class="create-rules-section" *ngFor="let grp of addGrp().controls; let k=index" [formGroupName]="k">
<div formGroupName="ifBlockRule" class="ifBlockRule">
<!-- how disable below button after one click in each array element-->
<button mat-raised-button color="primary" type="button" class="addGrpCond" (click)="ifBlockAddGrpCondition(k)" [disabled]="addGrpBtnclicked" title="Add group condition">
<mat-icon>add</mat-icon>
</button>
<!-- how disable above button after one click in each array element-->
</div>
</div>
</div>
单击数组元素后如何禁用注释行中提到的按钮?我是角度的新手。
解决方案
推荐阅读
- python - 如何从字典中删除列表并使其成为元组列表?
- regex - 正则表达式 - 仅匹配围绕数值的引号
- android-studio - 在 android studio 中是否有任何 whay 知道项目中使用的最高 api 是什么
- c - 阻止 SIGINT 终止程序
- django - Model.function(self) 和 self.function() 的区别
- php - 改进了没有许多 IF/ELSE 块的降级 SQL 查询
- python - 基于用户输入的动态 if 语句
- tensorflow - Tensorflow 模型 - 对象检测如何指定时期详细信息?
- ms-access-2010 - MS Access,如何检测触发器宏中的新插入与更新?
- jquery - 如何使用 Velocity.js 平滑滚动到元素?