From 3b921a32c1ec4b9fa98e400c2fd2630ed9b28b0b Mon Sep 17 00:00:00 2001 From: Ilia Choly Date: Thu, 5 Jan 2017 13:23:00 -0500 Subject: [PATCH 1/2] feat(ngOptions): add $value variable for easier use of trackBy+selectAs --- src/ng/directive/ngOptions.js | 26 +++++++++++++++----------- test/ng/directive/ngOptionsSpec.js | 20 ++++++++------------ 2 files changed, 23 insertions(+), 23 deletions(-) diff --git a/src/ng/directive/ngOptions.js b/src/ng/directive/ngOptions.js index af963c665dc7..0dd1460aaa25 100644 --- a/src/ng/directive/ngOptions.js +++ b/src/ng/directive/ngOptions.js @@ -66,9 +66,7 @@ var ngOptionsMinErr = minErr('ngOptions'); * * ### `select` **`as`** and **`track by`** * - *
- * Be careful when using `select` **`as`** and **`track by`** in the same expression. - *
+ * When using `select` **`as`** and **`track by`** in the same expression use the `$value` variable. * * Given this array of items on the $scope: * @@ -110,6 +108,14 @@ 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 `