-
Notifications
You must be signed in to change notification settings - Fork 83
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
第一次跳转,bind事件执行2次 #28
Comments
我也遇到了... |
我也遇到了。。。 |
同样的问题 |
解决了这个问题。
此时hash为空,getHash返回的是 /
然后会go到默认路由(一般是/)。 一个不太优雅的解决方案
然后将init中的默认路由跳转添加一次判断,然后使用location.hash去触发hashchange事件
@progrape 希望jf大大看看这样解决有没有什么问题 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
第一次跳转或者手动输入Url,bind的方法会执行2次,直接刷新则不会出现这个问题
The text was updated successfully, but these errors were encountered: