0

I am using ng:Disabled directive for disabling my submit button. Its working fine its not enabling until all the required input fields are getting filled, but when I am inspecting the element using Google chrome firebug console and manually delete the disabled attribute from submit button then its get "Enabled" and form is submitted. So my question is that how to handle this type of problem. There are any option to checking validate from controller and enable/disable submit button from controller.

Please give me some suggestion for this.

Basically I am referring this url: http://docs.angularjs.org/api/ng.directive:ngDisabled

4

1 回答 1

0

确保您的表单没有action属性,然后连接

表单元素 的ng-submit指令或 第一个按钮或类型提交的输入字段上的ng-click指令。

请参阅表格了解更多详情。

从该事件处理程序中,您可以执行其他验证并仅在验证正常时发送表单,否则显示错误。

于 2013-07-25T07:42:34.987 回答