[AngularJS] Re: Enable/Disable Save button according to changes in Form(DOM) data

2015-04-15 Thread ADITYA
Dear Like Kende, Thanks for your respone. You are right, having watch on object collection, I can enable/disable save button. Please tell me one thing more that how can we store the form controls value after page load into object collection inside the angularjs controller. So that I can find

[AngularJS] Re: Enable/Disable Save button according to changes in Form(DOM) data

2015-04-14 Thread Luke Kende
Well, you could bind each form field to a scope object and $watch the object for changes scope.myForm = { field1: 'initial_value', field2: null, field3: false } scope.$watch('myForm', function(newFields, oldFields) { if (newFields.field2.length) { scope.buttonDisabled = true; }