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

Commit 3e938bd

Browse files
stoneleepkozlowski-opensource
authored andcommitted
refactor(accordion): transclude function in compile is deprecated.
Closes #1789
1 parent 5ca23e9 commit 3e938bd

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

Diff for: src/accordion/accordion.js

+5-7
Original file line numberDiff line numberDiff line change
@@ -100,13 +100,11 @@ angular.module('ui.bootstrap.accordion', ['ui.bootstrap.collapse'])
100100
template: '', // In effect remove this element!
101101
replace: true,
102102
require: '^accordionGroup',
103-
compile: function(element, attr, transclude) {
104-
return function link(scope, element, attr, accordionGroupCtrl) {
105-
// Pass the heading to the accordion-group controller
106-
// so that it can be transcluded into the right place in the template
107-
// [The second parameter to transclude causes the elements to be cloned so that they work in ng-repeat]
108-
accordionGroupCtrl.setHeading(transclude(scope, function() {}));
109-
};
103+
link: function(scope, element, attr, accordionGroupCtrl, transclude) {
104+
// Pass the heading to the accordion-group controller
105+
// so that it can be transcluded into the right place in the template
106+
// [The second parameter to transclude causes the elements to be cloned so that they work in ng-repeat]
107+
accordionGroupCtrl.setHeading(transclude(scope, function() {}));
110108
}
111109
};
112110
})

0 commit comments

Comments
 (0)