Wednesday, October 30, 2013

AngularJS ng-option with IE8

IE always make our life a bit challenging. especially with AngularJS ng-option, it won't refresh the options unless we trigger it by modify the options content. I guess this is the rendering issue in IE8, it try to compare the reference instead of the value. Here is the code snippet if you need it.

3 comments:

Roger said...

Dude this rocks! Thanks so much. Small typo in the comments on to use. Should be ie-select-fix not sk-ie-select. But it works great. Stopped me from pulling more hair out.

Terry Go said...

Thanks for this!
I'm using IE8 and when I delete or add an item from or to the collection ng-option doesn't update select entry. This directive with $watch works great. One thing that I want to point is I had to use $watchCollection to make this work with AngularJS v1.2.14.

Unknown said...

This is awesome! Helped me.. Thanks a lot.