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

[Bug]angular10作为主应用页面如果url切换的比较快会出现路由不停的跳转进入死循环 #1388

Closed
Xiaoxiasuper opened this issue Apr 14, 2021 · 6 comments · Fixed by #1414

Comments

@Xiaoxiasuper
Copy link

What happens?

ng10含有lazyload module时, url变化过快,跳转进入死循环,项目越大越明显。

最小可复现仓库

https://github.com/Xiaoxiasuper/angular-qiankun-base-demo.git

复现步骤,错误日志以及相关配置

  • yarn or npm install
  • ng start
  • 频繁切换这几个按钮
    image
    路由就会不断跳转。

demo太小达不到量级,就在component的ngOnInit()里切换路由重现问题。
image

如果去掉qiankun的子应用注册相关,则能正常跳转
image

相关环境信息

  • qiankun 版本 2.4.0
@gongshun
Copy link
Collaborator

gongshun commented Apr 14, 2021

同一个问题?#1291 #775

貌似升级 single-spa 可以解决 #1291 (comment)

@Xiaoxiasuper
Copy link
Author

同一个问题?#1291 #775

貌似升级 single-spa 可以解决 #1291 (comment)

single-spa 升到 5.9.2 还是会复现

@waltbest2
Copy link

使用原生的跳转方法,比如window.location.hash

@Xiaoxiasuper
Copy link
Author

window.location.hash

项目history模式路由不适用

@sxhieen
Copy link

sxhieen commented May 25, 2021

这个问题去年我也遇到过#775 ,应该是single spa的问题,后来不得已就放弃了。我试过single spa的react基座和纯html的基座都没问题,angular的基座也是同样的问题。

@hanalice
Copy link

hanalice commented Apr 28, 2024

angular 16 没有碰到这个问题,使用的是single spa 5.9.5.

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