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

Commit 4ac9239

Browse files
committed
Fixing destroy event
1 parent 34f175c commit 4ac9239

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
@@ -128,7 +128,9 @@ angular.module('ui.slider', []).value('uiSliderConfig',{}).directive('uiSlider',
128128
function destroy() {
129129
elm.slider('destroy');
130130
}
131-
elm.bind('$destroy', destroy);
131+
scope.$on("$destroy", function() {
132+
destroy();
133+
});
132134
};
133135
}
134136
};

0 commit comments

Comments
 (0)