Pushing new state for same URL in Iron-Router

泪湿孤枕 提交于 2019-12-05 22:51:15
hharnisc

AFAIK you can't push browser state "silently" with the Iron Router package. However you can use one of these methods or the HTML 5 History API package that wraps this package - https://github.com/devote/HTML5-History-API

Dan Dascalescu

Haven't tried this, but I think something based on

Router.go(Router.current().request.url + '/modal')`

might work. You define your route with an optional parameter, and if it's 'modal' then display the modal. That may lead to problems if you have URL parameters, in which case you'd have to get more clever with the URL.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!