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 #4107 Closes #4122
This commit is contained in:
committed by
Peter Bacon Darwin
parent
f81d56e66c
commit
24aee81634
@@ -553,7 +553,7 @@ var selectDirective = ['$compile', '$parse', function($compile, $parse) {
|
||||
// rather then the element.
|
||||
(element = optionTemplate.clone())
|
||||
.val(option.id)
|
||||
.attr('selected', option.selected)
|
||||
.prop('selected', option.selected)
|
||||
.text(option.label);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user