I would like to create a wrapper for select-ui, as my items will load from the same place, so will put this in a directive instead of putting it all over my site, plus since i am using the same control in all places, if we update it in future, i would only like to update it in one place.
I have built a wrapper, but for some reason the value in the select is not being updated.
Here is a plunkr, with example code
http://plnkr.co/edit/QZP0MsDQOmafOW3dcfhT?p=preview
To use the ui-select you simply do
<div dropdown-select ng-model="input"></div>
EDIT:
May i am not making myself clear, but i would like to use ng-model on the wrapper directive called dropdown-select. I do NOT want to have to use the same scope variable names when i use this dropdown-select.
For example, if i use ng-model on an input, i can do
<input ng-model="input1" />
<input ng-model="myVarName" />
<input ng-model="somethingDifferent" />
All three of the above examples will work and each one of them will hold my value from the input.
Now i would like to be able to do the same thing with the wrapper directive i have used, just like you can do with ng-model on inputs and other controls.
So i should be able to do
<div dropdown-select ng-model="input1"></div>
<div dropdown-select ng-model="myItem"></div>
<div dropdown-select ng-model="whateverIWant"></div>
Now the select-ui should populate the selected item into these scope variables, once the value is selected.
Here is a plunkr with 2 instances of the dropdown-select wrapper, and neither one of them show the selected value when the select-ui value is selected.