Commit 3487c8b6 authored by Sam Saccone's avatar Sam Saccone

firebase-angular: Fix directive memory leaks

parent 7d9be778
......@@ -9,5 +9,9 @@ todomvc.directive('todoBlur', function () {
elem.bind('blur', function () {
scope.$apply(attrs.todoBlur);
});
scope.$on('$destroy', function () {
elem.unbind('blur');
});
};
});
......@@ -13,5 +13,9 @@ todomvc.directive('todoBlur', function () {
scope.$apply(attrs.todoEscape);
}
});
scope.$on('$destroy', function () {
elem.unbind('keydown');
});
};
});
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment