Skip to content

Commit

Permalink
Merge pull request angular-ui#1430 from Narretz/fix-1.5
Browse files Browse the repository at this point in the history
fix: make compatible with Angular 1.5 and non-cached templates
  • Loading branch information
aaronroberson committed Feb 12, 2016
2 parents 88aebde + 0e85670 commit b1c4fdc
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/uiSelectChoicesDirective.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
3 changes: 3 additions & 0 deletions src/uiSelectMatchDirective.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down
1 change: 1 addition & 0 deletions test/select.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -967,6 +967,7 @@ describe('ui-select tests', function() {
expect(function() {
compileTemplate(
'<ui-select ng-model="selection.selected"> \
<ui-select-match></ui-select-match> \
<ui-select-choices></ui-select-choices> \
</ui-select>'
);
Expand Down

0 comments on commit b1c4fdc

Please sign in to comment.