From 830ffa134e317a79e29fc6c87647a49a0c81fba7 Mon Sep 17 00:00:00 2001 From: Guillaume Wuip Date: Mon, 15 Dec 2014 22:02:11 +0100 Subject: [PATCH] onKeyDown function listener --- static/index.html | 2 +- static/js/app.js | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/static/index.html b/static/index.html index 458dffb..cee49e7 100644 --- a/static/index.html +++ b/static/index.html @@ -17,7 +17,7 @@ - +
diff --git a/static/js/app.js b/static/js/app.js index 8dda9c7..b6090c4 100644 --- a/static/js/app.js +++ b/static/js/app.js @@ -222,6 +222,12 @@ } }; + $rootScope.onKeyDown = function ($event) { + if ($event.keyCode == 27) { + $rootScope.sidebar = false + } + } + } ]);