diff options
Diffstat (limited to 'src/ng/directive/select.js')
| -rw-r--r-- | src/ng/directive/select.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/ng/directive/select.js b/src/ng/directive/select.js index 7a1cab53..6dda33f5 100644 --- a/src/ng/directive/select.js +++ b/src/ng/directive/select.js @@ -300,9 +300,9 @@ var selectDirective = ['$compile', '$parse', function($compile, $parse) { var match; if (! (match = optionsExp.match(NG_OPTIONS_REGEXP))) { - throw Error( - "Expected ngOptions in form of '_select_ (as _label_)? for (_key_,)?_value_ in _collection_ (track by _expr_)?'" + - " but got '" + optionsExp + "'."); + throw ngError(9, + "ngOptions error! Expected expression in form of '_select_ (as _label_)? for (_key_,)?_value_ in _collection_' but got '{0}'. Element: {1}", + optionsExp, startingTag(selectElement)); } var displayFn = $parse(match[2] || match[1]), @@ -357,7 +357,7 @@ var selectDirective = ['$compile', '$parse', function($compile, $parse) { for (var trackIndex = 0; trackIndex < collection.length; trackIndex++) { locals[valueName] = collection[trackIndex]; if (trackFn(scope, locals) == key) break; - } + } } else { locals[valueName] = collection[key]; } |
