Hi Jeevan, I'm not sure I fully understand what you're trying to do. Is data-image a directive, if so what does it do? If you're trying to set the content of `mobileoperators` then you need to chance `data-image` to `value` and it will be set.
It's worth noting that the option tag can only contain text. If you want to produce options lists with images attached you'll need to use something like ui-select2's <https://github.com/angular-ui/ui-select2>[1] templating. The select2 <http://ivaynberg.github.io/select2/#templating>[2] documentation has a good example of this. I hope this helps. S [1] https://github.com/angular-ui/ui-select2 [2] http://ivaynberg.github.io/select2/#templating On 9 June 2014 10:13, Jeevan Chamarthi <[email protected]> wrote: > Hi, > We are trying to fetch images from the model values and construct the > images in the select dropdown but that doesn't work with the following > approach. > > Please suggest. > > <select ng-model="mobileoperators"> > <option ng-repeat="operator in operators" > data-image="/home/images/{{operator.name}}.png">{{operator.name}}</option><select> > > > > Thanks, Jeevan > > -- > 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. > -- 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.
