Skip to content

Commit ea5636e

Browse files
committed
Fix scope issue with accordion
Fix issue with scope in add_accordion. When $destroy is called the ```this``` was not scoped appropriately.
1 parent 31a658f commit ea5636e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/accordion/accordion.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ angular.module('angularify.semantic.accordion', [])
88
this.add_accordion = function(scope) {
99
$scope.accordions.push(scope);
1010

11-
11+
var _this = this;
1212
scope.$on('$destroy', function (event) {
13-
this.remove_accordion(scope);
13+
_this.remove_accordion(scope);
1414
});
1515

1616
return $scope.accordions;

0 commit comments

Comments
 (0)