首页 > 解决方案 > 如果 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 个按钮?

在此处输入图像描述

标签: angularjslaravel

解决方案


推荐阅读