Skip to content

Commit 73e30ec

Browse files
committed
Merge pull request angular-ui#579 from mkielar/master
Properly handle HTML5 data-* attributes
2 parents 04b5f69 + 12612c9 commit 73e30ec

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Diff for: src/select.js

+2
Original file line numberDiff line numberDiff line change
@@ -1215,13 +1215,15 @@
12151215

12161216
var transcludedMatch = transcluded.querySelectorAll('.ui-select-match');
12171217
transcludedMatch.removeAttr('ui-select-match'); //To avoid loop in case directive as attr
1218+
transcludedMatch.removeAttr('data-ui-select-match'); // Properly handle HTML5 data-attributes
12181219
if (transcludedMatch.length !== 1) {
12191220
throw uiSelectMinErr('transcluded', "Expected 1 .ui-select-match but got '{0}'.", transcludedMatch.length);
12201221
}
12211222
element.querySelectorAll('.ui-select-match').replaceWith(transcludedMatch);
12221223

12231224
var transcludedChoices = transcluded.querySelectorAll('.ui-select-choices');
12241225
transcludedChoices.removeAttr('ui-select-choices'); //To avoid loop in case directive as attr
1226+
transcludedChoices.removeAttr('data-ui-select-choices'); // Properly handle HTML5 data-attributes
12251227
if (transcludedChoices.length !== 1) {
12261228
throw uiSelectMinErr('transcluded', "Expected 1 .ui-select-choices but got '{0}'.", transcludedChoices.length);
12271229
}

0 commit comments

Comments
 (0)