Skip to content
This repository has been archived by the owner on Apr 12, 2024. It is now read-only.

Commit

Permalink
clarify documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
icholy committed Jan 26, 2017
1 parent 4962888 commit eaf716b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/ng/directive/ngOptions.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,8 @@ var ngOptionsMinErr = minErr('ngOptions');
* expression evaluates to `items[0].subItem.id` (which is undefined). As a result, the model value
* is not matched against any `<option>` and the `<select>` appears as having no selected value.
*
* 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
* `ngModel` value. Here is the fixed version of the broken example above.
*
* ```html
* <select ng-options="item.subItem as item.label for item in items track by $value.id" ng-model="selected"></select>
Expand Down

0 comments on commit eaf716b

Please sign in to comment.