For ng-model="OneInfo" in the view, you can access to it in js like
var a1 = "One"; var valuea1 = $scope[a1 + "Info"]; On Saturday, January 31, 2015 at 3:36:35 AM UTC+6, Wade Zhu wrote: > > I have serial fields binding byng-model such as OneInfo,TwoInfo,ThreeInfo > in html view file and want to get their values in control ( js file). > > I want to get values from dynamic variable such as > > var a1='One'; > var a2='Two'; > var a3='Three' > > var getValue1=a1+'Info'; > var getValue2=a2+'Info'; > var getValue3=a3+'Info'; > > > Is there any expression or function to get value of getValue1, getValue2 > getValue3 ? such as in jquery I can get $(#getValue1). > > Thanks, > > Wade > > > > > -- 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.
