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 a topic in the Google Groups "AngularJS" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/angular/SOKewyBO_4k/unsubscribe.
To unsubscribe from this group and all its topics, send an email to angular+u...@googlegroups.com.
To post to this group, send email to ang...@googlegroups.com.
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.