diff options
| author | Igor Minar | 2013-07-24 16:42:52 -0700 |
|---|---|---|
| committer | Igor Minar | 2013-07-24 18:53:09 -0700 |
| commit | d87fa0042375b025b98c40bff05e5f42c00af114 (patch) | |
| tree | cd2ee7f2726d0e7006d03ffd1bf5449d6cdfe9ca /src/ng/compile.js | |
| parent | e03402433d2524fd3a74bbfce984f843794996ce (diff) | |
| download | angular.js-d87fa0042375b025b98c40bff05e5f42c00af114.tar.bz2 | |
fix(select): don't support binding to select[multiple]
changing the type of select box from single to multiple or the other way around
at runtime is currently not supported and the two-way binding does odd stuff
when such situation happens.
we might eventually support this, but for now we are just going to not allow
binding to select[multiple] to prevent people from relying on something that
doesn't work.
BREAKING CHANGE: binding to select[multiple] directly or via ngMultiple (ng-multiple)
directive is not supported. This feature never worked with two-way data-binding,
so it's not expected that anybody actually depends on it.
Closes #3230
Diffstat (limited to 'src/ng/compile.js')
| -rw-r--r-- | src/ng/compile.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/ng/compile.js b/src/ng/compile.js index 46ebe71a..c059af47 100644 --- a/src/ng/compile.js +++ b/src/ng/compile.js @@ -1220,6 +1220,11 @@ function $CompileProvider($provide) { if (!interpolateFn) return; + if (name === "multiple" && nodeName_(node) === "SELECT") { + throw new $compileMinErr("selmulti", "Binding to the multiple attribute is not supported. Element: {0}", + startingTag(node)); + } + directives.push({ priority: 100, compile: valueFn(function attrInterpolateLinkFn(scope, element, attr) { |
