angular-ui/angular-ui — pull request #443 by ProLoser (2013-02-18 20:13:03+00:00)
Title: Select2 Refactor

As part of being a good citizen, a directive that uses NgModel, should (AFAIK)

use the correct values to render elements. Previously the select control
was using modelValue as opposed to viewValue inside the $render method.
This meant that cool tricks (like injecting parsers and formatters did
not work properly).

Also changed the directive initialisation to be more robust. In certain
cases the initial value was not being set correctly... meaning that on
recreation, any bound data would not show up properly.