angular-leaflet-directive
angular-leaflet-directive copied to clipboard
Popup $destroy
$destroy event is not triggered after the popup is closed.
app.directive('mapDetailPopup', function () {
return {
restrict: 'E',
link: function (scope) {
var timerId = null;
timerId = setInterval(function () {
console.log('interval');
}, 2000);
scope.$on('$destroy', function () {
clearInterval(timerId);
console.log('destroy');
});
}
}
});
Is there way how can I remove the timer?
+1. It's a big problem ! Someone has a trick ?
I corrected it on ui-leaflet : Issue 240