micro-zoe / micro-app-demo

micro-app 案例
MIT License
220 stars 124 forks source link

angular13项目,子应用之间切换,ngOnDestroy生命周期没有触发 #16

Closed w2819 closed 2 years ago

w2819 commented 2 years ago
Angular CLI: 13.2.6
Node: 16.14.2
Package Manager: npm 8.5.0
OS: darwin arm64

Angular: 13.2.7
... animations, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, router

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1302.6
@angular-devkit/build-angular   13.2.6
@angular-devkit/core            13.2.6
@angular-devkit/schematics      13.2.6
@angular/cdk                    13.2.6
@angular/cli                    13.2.6
@schematics/angular             13.2.6
rxjs                            7.5.6
typescript                      4.5.5

如题,子路由之间切换未触发当前页面生命周期,导致页面上popover组件、订阅事件等无法正常卸载,导致切回子应用后,页面显示错误。在官方angular11项目中也可以复现 注:子应用卸载的时候 unmount 生命周期里app.destroy()会报错,屏蔽掉了

w2819 commented 2 years ago

提错地方了