There was an error while loading. Please reload this page.
1 parent 3b921a3 commit ee60a38Copy full SHA for ee60a38
1 file changed
src/ng/directive/ngOptions.js
@@ -108,7 +108,8 @@ var ngOptionsMinErr = minErr('ngOptions');
108
* expression evaluates to `items[0].subItem.id` (which is undefined). As a result, the model value
109
* is not matched against any `<option>` and the `<select>` appears as having no selected value.
110
*
111
- * here is the fixed version of the broken example above.
+ * The solution is to use `$value` variable which provides uniform access to each `item` and
112
+ * `ngModel` value. Here is the fixed version of the broken example above.
113
114
* ```html
115
* <select ng-options="item.subItem as item.label for item in items track by $value.id" ng-model="selected"></select>
0 commit comments