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

Commit

Permalink
refactor(accordion): transclude function in compile is deprecated.
Browse files Browse the repository at this point in the history
Closes #1789
  • Loading branch information
stonelee authored and pkozlowski-opensource committed Feb 22, 2014
1 parent 5ca23e9 commit 3e938bd
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions src/accordion/accordion.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,13 +100,11 @@ angular.module('ui.bootstrap.accordion', ['ui.bootstrap.collapse'])
template: '', // In effect remove this element!
replace: true,
require: '^accordionGroup',
compile: function(element, attr, transclude) {
return function link(scope, element, attr, accordionGroupCtrl) {
// Pass the heading to the accordion-group controller
// so that it can be transcluded into the right place in the template
// [The second parameter to transclude causes the elements to be cloned so that they work in ng-repeat]
accordionGroupCtrl.setHeading(transclude(scope, function() {}));
};
link: function(scope, element, attr, accordionGroupCtrl, transclude) {
// Pass the heading to the accordion-group controller
// so that it can be transcluded into the right place in the template
// [The second parameter to transclude causes the elements to be cloned so that they work in ng-repeat]
accordionGroupCtrl.setHeading(transclude(scope, function() {}));
}
};
})
Expand Down

0 comments on commit 3e938bd

Please sign in to comment.