diff --git a/src/uiSelectChoicesDirective.js b/src/uiSelectChoicesDirective.js index 53f281530..6af48c035 100644 --- a/src/uiSelectChoicesDirective.js +++ b/src/uiSelectChoicesDirective.js @@ -8,6 +8,9 @@ uis.directive('uiSelectChoices', replace: true, transclude: true, templateUrl: function(tElement) { + // Needed so the uiSelect can detect the transcluded content + tElement.addClass('ui-select-choices'); + // Gets theme attribute from parent (ui-select) var theme = tElement.parent().attr('theme') || uiSelectConfig.theme; return theme + '/choices.tpl.html'; diff --git a/src/uiSelectMatchDirective.js b/src/uiSelectMatchDirective.js index b8102c7ad..2f723eaad 100644 --- a/src/uiSelectMatchDirective.js +++ b/src/uiSelectMatchDirective.js @@ -5,6 +5,9 @@ uis.directive('uiSelectMatch', ['uiSelectConfig', function(uiSelectConfig) { replace: true, transclude: true, templateUrl: function(tElement) { + // Needed so the uiSelect can detect the transcluded content + tElement.addClass('ui-select-match'); + // Gets theme attribute from parent (ui-select) var theme = tElement.parent().attr('theme') || uiSelectConfig.theme; var multi = tElement.parent().attr('multiple'); diff --git a/test/select.spec.js b/test/select.spec.js index f2dd7de2e..c61030744 100644 --- a/test/select.spec.js +++ b/test/select.spec.js @@ -967,6 +967,7 @@ describe('ui-select tests', function() { expect(function() { compileTemplate( ' \ + \ \ ' );