ui-select2 icon indicating copy to clipboard operation
ui-select2 copied to clipboard

Simple binding with Select2 data object option

Open RedJandal opened this issue 11 years ago • 1 comments

I have changed the directive to always bind ng-model to the simple value returned by select2. I have also added a ui-data attribute that enables you to bind a property in your controller to the select2 data object if you need to access it.

Lets say select2 returns the object

{ id: 1, text: "My Selection" }

ng-model will equal 1 ui-data will equal

{ id: 1, text: "My Selection" }

This addresses the following issue

https://github.com/angular-ui/ui-select2/issues/126

RedJandal avatar Sep 15 '14 00:09 RedJandal

Unfortunately this change appears to break many of the tests.

Splaktar avatar Nov 12 '14 15:11 Splaktar