diff options
Diffstat (limited to 'src/widget/select.js')
| -rw-r--r-- | src/widget/select.js | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/widget/select.js b/src/widget/select.js index c70b5ded..e66d4cba 100644 --- a/src/widget/select.js +++ b/src/widget/select.js @@ -131,7 +131,8 @@ angularWidget('select', function(element){ this.directives(true); this.descend(true); return element.attr('ng:model') && - ['$formFactory', '$compile', '$element', function($formFactory, $compile, selectElement){ + ['$formFactory', '$compile', '$parse', '$element', + function($formFactory, $compile, $parse, selectElement){ var modelScope = this, match, form = $formFactory.forElement(selectElement), @@ -224,12 +225,12 @@ angularWidget('select', function(element){ } var widgetScope = this, - displayFn = expressionCompile(match[2] || match[1]), + displayFn = $parse(match[2] || match[1]), valueName = match[4] || match[6], keyName = match[5], - groupByFn = expressionCompile(match[3] || ''), - valueFn = expressionCompile(match[2] ? match[1] : valueName), - valuesFn = expressionCompile(match[7]), + groupByFn = $parse(match[3] || ''), + valueFn = $parse(match[2] ? match[1] : valueName), + valuesFn = $parse(match[7]), // we can't just jqLite('<option>') since jqLite is not smart enough // to create it in <select> and IE barfs otherwise. optionTemplate = jqLite(document.createElement('option')), |
