I\'m trying to achieve something very straightforward:
{
some people here touched the problem but i'll make it clear. for some reason ui-select requires the ng-model to be a nested value within $scope. so ng-model must point to x.y within scope and not x or y.
I'm struggling as well with a very basic use case, on Angular 1.2.16 and ui-select 0.8.3. Although it seems to me there's a typo in your code, in ui-select-match.
Usually that attributes looks like {{$select.selected.your_property_here}}
, so double curly braces and single dollar sign, for some kind of standard property name $select.selected
. Could it be this is your issue?
Not sure if you figured this out already, but I was also struggling with this "basic use case" today, being new to AngularJS and all. I'm using Angular 1.2.16 and ui-select 0.8.3, and while everything else worked, I just couldn't get it to update the scope variable employee.selected
.
In my case, the issue was caused by my limited experience with AngularJS. Since ng-model is set to a property of an object (employee, in my case) it had to be initialized first. Adding $scope.employee = {};
into the controller resolved this.