You would need to subscribe to the history listener to make this work- something I recently did in a project.
That being said, there will also be issues with hostory.goBack() to close the modal, if it wasn't opened from the parent page. I ended up pushing a new route to the parent page to close the model - history listener listens for a MODAL_TOKEN unique string (id of modal) on the page as a hash (page/route#the-modal). If there and modal is closed, open. If not there and modal is open, close.
I plan on posting about an advanced router modal soon. Hope this helps.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
It doesnt work, if i navigate to route contact/andrew-garfield directly in browser (say, i come from another resourse)
You would need to subscribe to the history listener to make this work- something I recently did in a project.
That being said, there will also be issues with hostory.goBack() to close the modal, if it wasn't opened from the parent page. I ended up pushing a new route to the parent page to close the model - history listener listens for a MODAL_TOKEN unique string (id of modal) on the page as a hash (page/route#the-modal). If there and modal is closed, open. If not there and modal is open, close.
I plan on posting about an advanced router modal soon. Hope this helps.