0

While switching between dropdown values in Angularjs Select directive, only the ng-model value is updated. But in browser console selected class wont be changed. How to change the selected value? see this example http://embed.plnkr.co/lqMR0Yl2hjVQ9qPfcbBd/

After selecting option "one" in dropdown in browser console the selected="selected" value wont be changed. see this screenshot.enter image description here

why selected="selected" value is not updated for the respective selected option in dropdown?how to do this?

VijayVishnu
  • 537
  • 2
  • 11
  • 34
  • well angular select directive onLoad it set's dom selected='selected' only if something selected by default and it wont re-construct the `dom` like a ng-repeat . – super cool Aug 08 '18 at 07:50
  • i need to update the dom element too, how to externally re construct dom element? – VijayVishnu Aug 08 '18 at 07:57
  • do you mind explaining why you need that, there might be a possible neat alternative . – super cool Aug 08 '18 at 09:34
  • 1
    one way is using jquery to manipulate dom sample here https://plnkr.co/edit/ix5vhMY9yDYBJzsFzlfW?p=preview . – super cool Aug 08 '18 at 09:50
  • does it solve your case . feel free to add as a answer if you fond a proper solution, it might help someone . – super cool Aug 09 '18 at 04:17

0 Answers0