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

Commit ce9cd12

Browse files
committed
Merge pull request #55 from TigerC10/master
Fixing destroy event
2 parents 0e6c1c1 + 4ac9239 commit ce9cd12

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/slider.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,9 @@ angular.module('ui.slider', []).value('uiSliderConfig',{}).directive('uiSlider',
131131
function destroy() {
132132
elm.slider('destroy');
133133
}
134-
elm.bind('$destroy', destroy);
134+
scope.$on("$destroy", function() {
135+
destroy();
136+
});
135137
};
136138
}
137139
};

0 commit comments

Comments
 (0)