aboutsummaryrefslogtreecommitdiffstats
path: root/src/ng/directive/select.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/ng/directive/select.js')
-rw-r--r--src/ng/directive/select.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/ng/directive/select.js b/src/ng/directive/select.js
index 0b6288c1..fb03e0ca 100644
--- a/src/ng/directive/select.js
+++ b/src/ng/directive/select.js
@@ -1,5 +1,6 @@
'use strict';
+var ngOptionsMinErr = minErr('ngOptions');
/**
* @ngdoc directive
* @name ng.directive:select
@@ -152,6 +153,7 @@ var selectDirective = ['$compile', '$parse', function($compile, $parse) {
self.addOption = function(value) {
+ assertNotHasOwnProperty(value, '"option value"');
optionsMap[value] = true;
if (ngModelCtrl.$viewValue == value) {
@@ -300,7 +302,7 @@ var selectDirective = ['$compile', '$parse', function($compile, $parse) {
var match;
if (! (match = optionsExp.match(NG_OPTIONS_REGEXP))) {
- throw minErr('ngOptions')('iexp',
+ throw ngOptionsMinErr('iexp',
"Expected expression in form of '_select_ (as _label_)? for (_key_,)?_value_ in _collection_' but got '{0}'. Element: {1}",
optionsExp, startingTag(selectElement));
}