我的表单在验证空字段时遇到问题。当用户单击编辑按钮并清除输入字段然后单击发送按钮时,不会发生任何验证。我已经尝试过 angularjs 的表单验证,但它似乎不起作用。这是实时视图谢谢
http://jsfiddle.net/5DMjt/920/
function ClickToEditCtrl($scope) {
$scope.name = "joe Doe";
$scope.email = "joe@yahoo.com";
$scope.enableEditor = function () {
$scope.showEditor = true;
$scope.editName = $scope.name;
$scope.editEmail = $scope.email;
};
$scope.disableEditor = function () {
$scope.showEditor = false;
};
$scope.saveEditor = function () {
$scope.name = $scope.editName;
$scope.email = $scope.editEmail;
$scope.disableEditor();
};
}