You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
When both a track by expression and a select as expression are used in ng-options, binding doesn't work anymore.
For instance:
it('should bind to scope value through experession while tracking/identifying objects',function(){createSelect({'ng-model': 'selected','ng-options': 'item.id as item.name for item in values track by item.id'});scope.$apply(function(){scope.values=[{id: 10,name: 'A'},{id: 20,name: 'B'}];scope.selected=scope.values[0].id;});expect(element.val()).toEqual('10');scope.$apply(function(){scope.selected=scope.values[1].id;});expect(element.val()).toEqual('20');});
It seems that in the ngOptions directive, the track function always directly use the value expression even if a select as expression is set.