Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
clarify documentation
  • Loading branch information
icholy committed Jun 20, 2018
commit ee60a3859c615623dec98ebfc92a67c96bc6530b
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