Open Flowrome opened 4 years ago
Stencil version:
1.8.1
I'm submitting a ... (check one with "x") [x] bug report [ ] feature request [ ] support request
Current behavior: When using hashchange listener with historyType="browser" the event is not firing:
<stencil-router historyType="browser"> ... </stencil-router> private hashChangeHandler(): void { window.addEventListener('hashchange', (e) => { console.log(e) }) }
Expected behavior: even if i use the browser navigation the hashChange listener should work
Steps to reproduce: Just start a Stencil application with stencil router and navigate programmatically on a route with an hash and add a hashchange listener.
Thank you for your work.
Romeo Nupieri
I'm on the same boat. In the mean time if you want you can just use a regular a tag as it won't cause a page reload if you're just updating the hash
a
Stencil version:
I'm submitting a ... (check one with "x") [x] bug report [ ] feature request [ ] support request
Current behavior: When using hashchange listener with historyType="browser" the event is not firing:
Expected behavior: even if i use the browser navigation the hashChange listener should work
Steps to reproduce: Just start a Stencil application with stencil router and navigate programmatically on a route with an hash and add a hashchange listener.
Thank you for your work.
Romeo Nupieri