Skip to content

Commit

Permalink
Merge pull request angular-ui#579 from mkielar/master
Browse files Browse the repository at this point in the history
Properly handle HTML5 data-* attributes
  • Loading branch information
dimirc committed Feb 16, 2015
2 parents 04b5f69 + 12612c9 commit 73e30ec
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/select.js
Original file line number Diff line number Diff line change
Expand Up @@ -1215,13 +1215,15 @@

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

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

0 comments on commit 73e30ec

Please sign in to comment.