我正在尝试使用某些条件启用和禁用按钮
我可以使用$scope.isDisabled = true;
禁用按钮,但无法启用按钮
这是我的代码
HTML文件
<input type="submit" value="Continue" ng-model="isDisabled" ng-disabled="isDisabled">
控制器JS文件
$scope.isDisabled = true; // here the button disabled (for me)
if (count >= 3) { // it's always true
$scope.isDisabled = false; // try to enable the button here
}
答案 0 :(得分:1)
这是一个显示它正常工作的插件 - 我做了一些假设以使得插件正常运行。添加了一个触发计数增量的额外按钮。