8000 fix(select): Select option with ngOptions when label equals $viewValue · felixcoto/angular.js@7d6efe7 · GitHub
[go: up one dir, main page]

Skip to content

Commit 7d6efe7

Browse files
committed
fix(select): Select option with ngOptions when label equals $viewValue
Fix selectController when using ngOptions and the label equals the $viewValue of the ngModel. Otherwise, when the options are loaded, selectController set the value of the select to a non existing value Fixes angular#11170
1 parent 1d67577 commit 7d6efe7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/ng/directive/selectSpec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1891,7 +1891,7 @@ describe('select', function() {
18911891
it('should select the correct option when label equals $viewValue', function(){
18921892
scope.numbersArray = ["Zero", "One", "Two", "Three", "Four", "Five", "Six", "Seven", "Eight", "Nine", "Ten"];
18931893
scope.values= {};
1894-
scope.selected='Four'
1894+
scope.selected='Four';
18951895
createSelect({
18961896
'ng-model': 'selected',
18971897
'ng-options': 'option.value as option.value for option in values'

0 commit comments

Comments
 (0)
0