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

**URL:** <https://discourse.nodered.org/t/how-to-get-the-window-addeventlistener-hashchange-in-a-dashboard-template/15550>\
**Category:** Dashboard\
**Created:** [15 September 2019 08:26 UTC](https://discourse.nodered.org/t/how-to-get-the-window-addeventlistener-hashchange-in-a-dashboard-template/15550 "2019-09-15T08:26:09Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Frank2000](https://avatars.discourse-cdn.com/v4/letter/f/ebca7d/32.png) [@Frank2000](https://discourse.nodered.org/u/Frank2000)\
**Post date:** [15 September 2019 08:26 UTC](https://discourse.nodered.org/t/how-to-get-the-window-addeventlistener-hashchange-in-a-dashboard-template/15550/1 "2019-09-15T08:26:09Z")

</div>

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?
