例如我有:
<button ng-disabled="!isSomethingValid() || loading || disabled" ... class="btn btn-primary">
但是,ng-disable
属性评估它的表达式的条件是什么?
答案 0 :(得分:0)
ng-disabled用于在值返回true时禁用DOM元素。
<button ng-disabled="mySwitch">Click Me!</button>
<button type = "text" ng-click = "fnDemo();">Button</button>
$scope.mySwitch = true;
$scope.fnDemo = function(){
$scope.mySwitch = !$scope.mySwitch;
};