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

切换reuse组件tab时,带有children路由的界面会被执行ngOnDestroy #1885

Open
KellenHe opened this issue Dec 21, 2020 · 6 comments

Comments

@KellenHe
Copy link

Reproduction link

https://stackblitz.com/edit/ng-alain-setup-vtsqsh?file=src/app/app.component.html

Steps to reproduce

切换item和list

What is expected?

期望路由会被复用,不会ngOnDestroy

What is actually happening?

离开路由后执行了ngOnDestroy

Environment Info
ng-alain 9.5.5
Browser chrome
@cipchk
Copy link
Member

cipchk commented Dec 21, 2020

麻烦更新至最新版本试一下。

@KellenHe
Copy link
Author

@cipchk
https://stackblitz.com/edit/ng-alain-setup-vtsqsh?file=src/app/app.component.html
这里面用的是10.1.3,也有这个问题。

@cipchk
Copy link
Member

cipchk commented Dec 26, 2020

@KellenHe 非常奇怪,我本地是正常的,这里看 起来只有 ItemComponent 层级无法缓存,而 ItemSubComponent 是正常的。

@KellenHe
Copy link
Author

是的,带有children的层级无法缓存,children反而可以

@vinstics
Copy link

+1同样遇到这个问题

1 similar comment
@bucengfangqi
Copy link

+1同样遇到这个问题

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

4 participants