summaryrefslogtreecommitdiffstats
path: root/js/build/app.js
diff options
context:
space:
mode:
authorBernhard Posselt <dev@bernhard-posselt.com>2014-09-18 14:39:45 +0200
committerBernhard Posselt <dev@bernhard-posselt.com>2014-09-18 14:39:45 +0200
commit682f89fa8d6ad3748b0a64f4e3a1c71a6982a1d1 (patch)
tree0af5ea281e2dae3fa530cc648babe16314e77ae1 /js/build/app.js
parentd45ce51678df7b5dcfa29d02d59962ccdbf95771 (diff)
fix delete
Diffstat (limited to 'js/build/app.js')
-rw-r--r--js/build/app.js6
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();