Open matodrobec opened 8 years ago
$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'); }); } } });
popup destroy example
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
$destroy event is not triggered after the popup is closed.
popup destroy example
Is there way how can I remove the timer?