I need a way to loop through the registered controls of an AngularJS form. Essentially, I\'m trying to get all the $dirty controls, but there\'s no array of the controls (t
You can use the following code to iterate the controls:
var data = {}; angular.forEach(myForm, function (value, key) { if (value.hasOwnProperty('$modelValue')) data[key] = value.$modelValue; });