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

Commit

Permalink
Merge pull request #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

10 comments on commit b1c4fdc

@sb8244
Copy link

@sb8244 sb8244 commented on b1c4fdc Feb 16, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will this be deployed to bower? It looks like the last push to bower was Oct 2015.

@adarshbhat
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Waiting for a new build with the fix. Thanks for this!

@francesco-carrella
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 for a quick release!

@reimundklain
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@andrecbr
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@aaronroberson
Copy link
Contributor Author

@aaronroberson aaronroberson commented on b1c4fdc Feb 18, 2016 via email

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@andrecbr
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh really, my fault. thanks!
My bower installed v0.13.2

@ferminmoli
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It did not work for me. Using angular 1.5 and UI-Select 0.17.1

@user378230
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ferminmoliuevo This appears to have worked for most others, you should probably open an issue with the a repro plunkr http://angular-ui.github.io/ui-select/#examples

@aaronroberson
Copy link
Contributor Author

@aaronroberson aaronroberson commented on b1c4fdc Apr 1, 2019 via email

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.