angularjs - 如果 NG-Disabled = true 我的所有按钮都被禁用
问题描述
我正在使用 Ng-Disabled 使列表中的项目的保存按钮不可用。
这是我的按钮:
<button type="button"
class="btn btn-primary"
ng-click="send(precio)"
ng-disabled="guardarDisabled || ( precio.precio_venta == 0 )">
</button>
这是我的条件:
if( !$scope.permisos && utilidad < 0 ) {
precio.incorrecto = true;
precio.utilidad = float_to_str_mask(0)
$scope.guardarDisabled = true;
}else{
$scope.guardarDisabled = false;
return;
}
当guardarDisabled = true
您在图像中看到所有按钮都被禁用时。
guardarDisabled = true
满意时如何禁用每个项目的 1 个按钮?
解决方案
推荐阅读
- c# - C# Confluent.Apache.Avro - GenericRecord.Add(schema) 在模式中有枚举
- php - 将 Stripe 结帐会话与订阅 webhook 关联
- c++ - 我怎样才能在循环中做减法?
- ibm-mq - 可以在两个远程 qmgrs 中使用具有相同 CN 的证书吗?
- vue.js - 图例未显示使用 Echarts 的 vue.js 项目
- javascript - 使用 ShellExecute 正确识别打开的 Web 浏览器以使用 document.getElement
- archunit - 确保从另一个方法调用?
- sql-server - SQL Server 2019 忽略 WHERE 子句?
- acumatica - 可以为 AP 账单分配不同的审批人
- laravel - 使用 Laravel Controller 加载索引时获取当天的记录