NG-ZORRO / ng-zorro-antd

Angular UI Component Library based on Ant Design
https://ng.ant.design
MIT License
8.85k stars 3.9k forks source link

unexpected transition when router change #2697

Closed vthinkxie closed 4 years ago

vthinkxie commented 5 years ago

https://stackblitz.com/edit/ng-zorro-antd-start-qgr95a?file=src%2Fapp%2Fhome%2Fhome.component.html

blackraindrop commented 5 years ago

https://stackblitz.com/edit/ng-zorro-antd-start-sbvjt5

blackraindrop commented 5 years ago

https://stackblitz.com/edit/ng-zorro-antd-start-nqwret 把导航从路由组件移动到app.component不会闪烁。

blackraindrop commented 5 years ago

https://stackblitz.com/edit/ng-zorro-antd-start-sxbud9 使用router.navigate代替routerlink也不会闪烁

vthinkxie commented 5 years ago

transition error without ng-zorro-antd https://stackblitz.com/edit/ng-zorro-antd-start-uvffqm?file=src%2Fapp%2Fapp.component.ts

vthinkxie commented 5 years ago

ref https://github.com/angular/material2/issues/14646

trotyl commented 5 years ago

For workaround, using imperative className assignment rather than class binding:

https://stackblitz.com/edit/ng-zorro-antd-start-jw8faq?file=src/app/app.component.ts

This is likely to be a Chrome issue triggered by specific timing, while not sure what the real cause, using a different action sequence may get rid of this issue.

vthinkxie commented 4 years ago

ref https://github.com/angular/angular/issues/34718