Skip to content
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

Angular子应用,浏览器后退,上一级页面未触发ngOnInit #913

Open
fnequal opened this issue Oct 17, 2024 · 0 comments
Open

Comments

@fnequal
Copy link

fnequal commented Oct 17, 2024

描述bug
跳转子应用后,使用子应用的内部路由跳转到新的页面,此时点击浏览器后退按钮返回上一级页面,显示异常

如何复现
给出详细的复现步骤
1、参考官方demo,React 16主应用,Angular 6子应用,开启路由同步,主应用跳转到子应用,默认页面 /a
2、子应用内使用angular/router,点击按钮跳转到新的页面 /b
3、点击浏览器后退按钮返回页面/a,页面显示异常
4、通过log发现后退返回时未触发上一级页面的ngOnInit事件,导致通过接口请求的动态内容未渲染

错误截图

最小复现仓库或者地址

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant