Commit 7d9be778 authored by Sam Saccone's avatar Sam Saccone

angularjs-require: Fix directive memory leak

parent 43a4b519
...@@ -11,6 +11,10 @@ define(['app'], function (app) { ...@@ -11,6 +11,10 @@ define(['app'], function (app) {
scope.$apply(attrs.todoEscape); 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