Skip to content

Commit 24aee81

Browse files
colincaseypetebacondarwin
authored andcommitted
refact(select): use prop to modify the select property
jQuery suggests using `prop` rather than `attr` to modify the `select` property of an element. You can see the full list of migration warnings for jQuery: https://github.com/jquery/jquery-migrate/blob/master/warnings.md Closes angular#4107 Closes angular#4122
1 parent f81d56e commit 24aee81

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ng/directive/select.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -553,7 +553,7 @@ var selectDirective = ['$compile', '$parse', function($compile, $parse) {
553553
// rather then the element.
554554
(element = optionTemplate.clone())
555555
.val(option.id)
556-
.attr('selected', option.selected)
556+
.prop('selected', option.selected)
557557
.text(option.label);
558558
}
559559

0 commit comments

Comments
 (0)