105
rated 0 times
[
110]
[
5]
/ answers: 1 / hits: 6274
/ 11 Years ago, sat, january 18, 2014, 12:00:00
I have a select element in my html bound to an ng-model.
Something like this example:
<select data-ng-model=accountType data-ng-options=at.name for at in accountTypes> </select>
My accountTypes would look like this:
accountTypes:[
{ name:'Individual', value: 1, title: 'Individual Account'},
{ name: 'Joint', value: 2, title: 'Joint Account'}
];
How can I achieve the final markup to look like this once the model is bound:
<option value=1 title=Individual Account>Individual</option>
<option value=2 titleJoint Account>Joint</option>
PS: jQuery hacks appreciated but my ideal solution would something (jQuery, DOM-modification)less.
More From » html