diff options
Diffstat (limited to 'js/build/app.js')
-rw-r--r-- | js/build/app.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/js/build/app.js b/js/build/app.js index 6c4158e9b..6df4294d1 100644 --- a/js/build/app.js +++ b/js/build/app.js @@ -583,6 +583,7 @@ app.controller('NavigationController', }; this.deleteFeed = function (feed) { + console.log('deleted!'); FeedResource.delete(feed.url); }; @@ -2229,7 +2230,8 @@ app.directive('newsTimeout', ["$timeout", "$rootScope", function ($timeout, $roo // remove timeout if element is being removed by // for instance clicking on the x button - element.on('$destroy', function () { + scope.$on('$destroy', function () { + destroyed = true; $timeout.cancel(timer); }); @@ -2239,6 +2241,8 @@ app.directive('newsTimeout', ["$timeout", "$rootScope", function ($timeout, $roo // $locationChangeStart triggers twice because of the trailing // slash on the link which is kinda a hack to reload the route // if you click on the link when the route is the same + $timeout.cancel(timer); + if (!destroyed) { destroyed = true; element.remove(); |