{
$scope.editable = true;
$scope.NewEmployee = function () {
$scope.editable = false;
};
$scope.EditEmployee = function () {
$scope.editable = false;
$scope.Employee.edit = true;
};
$scope.Cancel = function () {
$scope.editable = true;
};
}
<button ng-click="NewEmployee()"></button>
<button ng-click="EditEmployee()" ></button>
<button ng-click="Save()" ng-disabled="editable"></button>
<button ng-class="Cancel()" ng-disabled="editable"></button>
当只有NewEmployee()它的工作
但是我添加EditEmployee()Save()取消()其中一个不起作用
答案 0 :(得分:2)
您的代码中存在TYPO错误
<button ng-class="Cancel()" ng-disabled="editable"></button>
ng-class="Cancel()"
这应该像ng-click="Cancel()"