如何在特定按钮上设置ng-disabled为false

How to set ng-disabled to false on specific button

本文关键字:设置 ng-disabled false 按钮      更新时间:2023-09-26

我有一个字段集,它根据某些条件将ng-disabled设置为true或false。

<fieldset class="panel-body" ng-disabled="CoreFormPartVI.overview.UserReadOnly     || CoreFormPartVI.overview.Locked">

我有一个按钮,无论这个字段集如何,我都想启用它。

excel-definition="CoreFormPartVI.PartVIRelationshipDefinition" ng-disabled="readOnly"
                            ></div>

我试着在按钮上设置ng-disabled="false",但这似乎不起作用。有没有办法说,禁用除特定按钮以外的所有东西?

虽然这并不能解决你的问题,但你可能不想使用ng-disabled的字段集,因为它在IE(甚至11)中不起作用。

http://www.w3schools.com/tags/att_fieldset_disabled.asp

我建议您单独禁用每个元素(绑定到相同的作用域变量以便于触发)