stencil-community / stencil-router

A simple router for Stencil apps and sites
https://stenciljs.com/
MIT License
189 stars 55 forks source link

Route change event #75

Open matteobortolazzo opened 6 years ago

matteobortolazzo commented 6 years ago

Stencil version:

 @stencil/core@0.13.2

I'm submitting a:

[ ] bug report [X] feature request [ ] support request => Please do not submit support requests here, use one of these channels: https://stencil-worldwide.herokuapp.com/ or https://forum.ionicframework.com/

Current behavior:

Expected behavior: stencil-router should have an event that fires when the page change.

Steps to reproduce:

Related code:

// insert any relevant code here

Other information:

wanoo21 commented 6 years ago

I've also faced with this problem, but I've created a solution! Take a look on this https://github.com/wanoo21/stencil-route-listener, could be useful also for you till there will be an official one.

matteobortolazzo commented 6 years ago

Wow, thanks you!!!

PuruVJ commented 4 years ago

Thanks to @wanoo21 for his solution. If you want, you can use the native way to watch the location prop. Here, I wrote a blog post about it: https://puruvj.dev/blog/stencil-router-events