How to get the window.addEventListener("hashchange".... in a dashboard template

Hi!

Someone knows how to get the "hashchange" event in a dashboard template?
scope.$watch('msg.payload',.... works for the msg.payload, but how to get the change on the URL hash?