aboutsummaryrefslogtreecommitdiffstats
path: root/src/ng/directive/select.js
diff options
context:
space:
mode:
authorAjay Roopakalu2014-01-03 22:15:21 -0500
committerJeff Cross2014-01-10 09:50:28 -0800
commit43a2f3d0bf435e3626cd679caff4281cfb3415bd (patch)
tree55b27c8a7eec0351f6f93655a992fe60fe61253e /src/ng/directive/select.js
parenta9cccbe14f1bd9048f5dab4443f58c804d4259a1 (diff)
downloadangular.js-43a2f3d0bf435e3626cd679caff4281cfb3415bd.tar.bz2
feat(select): allow multiline ng-options
This patch allows the ng-options value of a <select> element to span multiple lines, which would previously throw an error when used with filters. Closes #5602
Diffstat (limited to 'src/ng/directive/select.js')
-rw-r--r--src/ng/directive/select.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ng/directive/select.js b/src/ng/directive/select.js
index 3dbb5b8e..62e460c5 100644
--- a/src/ng/directive/select.js
+++ b/src/ng/directive/select.js
@@ -129,7 +129,7 @@ var ngOptionsDirective = valueFn({ terminal: true });
// jshint maxlen: false
var selectDirective = ['$compile', '$parse', function($compile, $parse) {
//0000111110000000000022220000000000000000000000333300000000000000444444444444444000000000555555555555555000000066666666666666600000000000000007777000000000000000000088888
- var NG_OPTIONS_REGEXP = /^\s*(.*?)(?:\s+as\s+(.*?))?(?:\s+group\s+by\s+(.*))?\s+for\s+(?:([\$\w][\$\w]*)|(?:\(\s*([\$\w][\$\w]*)\s*,\s*([\$\w][\$\w]*)\s*\)))\s+in\s+(.*?)(?:\s+track\s+by\s+(.*?))?$/,
+ var NG_OPTIONS_REGEXP = /^\s*([\s\S]+?)(?:\s+as\s+([\s\S]+?))?(?:\s+group\s+by\s+([\s\S]+?))?\s+for\s+(?:([\$\w][\$\w]*)|(?:\(\s*([\$\w][\$\w]*)\s*,\s*([\$\w][\$\w]*)\s*\)))\s+in\s+([\s\S]+?)(?:\s+track\s+by\s+([\s\S]+?))?$/,
nullModelCtrl = {$setViewValue: noop};
// jshint maxlen: 100