Hi Vignesh,
This can be done fairly simple, but I seriously think you should not be
dong this inside a controller. Its a kind of design
that will get you into trouble later on, while extending/maintaining your
app.
var el = angular.element('input');
var names = [];
var model = '';
for (var i=0, l=el.length;i<l; i +=1 ) {
model = angular.element(el[i]).attr('ngModel'))
if (model) { names.push(model) }
}
I din’t test the code, so it might need some fiddling ;)
Regards
Sander
--
You received this message because you are subscribed to the Google Groups
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.