NativeScript / NativeScript/angular
Modal route issue - route runs twice when returning from second modal containing route outlet
还没有人认领这个 Issue。
- 主要语言
- TypeScript
- 星标
- 55
- 派生
- 13
- 平均合并
- 16 分钟
- 30 天内合并 PR
- 1
描述
This is most evident in iOS. I've set up a demo app:
https://stackblitz.com/edit/nativescript-stackblitz-templates-vwcmqt
In iOS, if you follow the steps (they're numbered) you'll see that when you navigate back on step five, the animation runs twice—backwards then forwards. This appears to come from the shouldDetach method NSRouteReuseStrategy. If I use the previous code for shouldDetatch that was altered here:
https://github.com/NativeScript/angular/commit/bebcde23c4d6a392638c23ec1e2bc63b06a9b43e
then it works without problem.
NOTE: For this demo, I've used 14.2.6-alpha.0 because without it, I can't use modals with ModalDialogParams because of injector scope issues. However, this router problem described above also occurs in 14.2.5 when the modal corrections are in place. Either way, something isn't working as it should.
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
从 NSRouteReuseStrategy.shouldDetach 方法开始,并将其与 commit beb cde23c4d6a392638c23ec1e2bc63b06a9b43e 中较早的实现进行比较。在 iOS 上复现链接的 StackBlitz 演示中的编号流程,包括从包含 route outlet 的第二个 modal 返回。完成的标准是:第五步的返回导航只运行一次动画,而不是先反向运行再正向运行。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- angular, typescript
- 领域
- frontend, mobile-dev
- Issue 类型
- 缺陷
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100