Skip to content
This repository was archived by the owner on Oct 2, 2019. It is now read-only.

Commit b1c4fdc

Browse files
committed
Merge pull request #1430 from Narretz/fix-1.5
fix: make compatible with Angular 1.5 and non-cached templates
2 parents 88aebde + 0e85670 commit b1c4fdc

File tree

3 files changed

+7
-0
lines changed

3 files changed

+7
-0
lines changed

src/uiSelectChoicesDirective.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ uis.directive('uiSelectChoices',
88
replace: true,
99
transclude: true,
1010
templateUrl: function(tElement) {
11+
// Needed so the uiSelect can detect the transcluded content
12+
tElement.addClass('ui-select-choices');
13+
1114
// Gets theme attribute from parent (ui-select)
1215
var theme = tElement.parent().attr('theme') || uiSelectConfig.theme;
1316
return theme + '/choices.tpl.html';

src/uiSelectMatchDirective.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ uis.directive('uiSelectMatch', ['uiSelectConfig', function(uiSelectConfig) {
55
replace: true,
66
transclude: true,
77
templateUrl: function(tElement) {
8+
// Needed so the uiSelect can detect the transcluded content
9+
tElement.addClass('ui-select-match');
10+
811
// Gets theme attribute from parent (ui-select)
912
var theme = tElement.parent().attr('theme') || uiSelectConfig.theme;
1013
var multi = tElement.parent().attr('multiple');

test/select.spec.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -967,6 +967,7 @@ describe('ui-select tests', function() {
967967
expect(function() {
968968
compileTemplate(
969969
'<ui-select ng-model="selection.selected"> \
970+
<ui-select-match></ui-select-match> \
970971
<ui-select-choices></ui-select-choices> \
971972
</ui-select>'
972973
);

0 commit comments

Comments
 (0)