NativeScript / NativeScript/angular
Navigation and nested page-router-outlet with lazy loaded children
還沒有人認領這個 Issue。
- 主要語言
- TypeScript
- 星號
- 55
- 分支
- 13
- 平均合併
- 16 分鐘
- 30 天內合併 PR
- 1
描述
Environment
Provide version numbers for the following components (information can be retrieved by running tns info in your project folder or by inspecting the package.json of the project):
- CLI: 8.1.5
- Cross-platform modules: 8.1.5
- Android Runtime: 8.1.0
- iOS Runtime: 8.1.1
- Plugin(s): "@nativescript-community/ui-material-bottom-navigation": "~6.2.13"
- NativeScript-Angular: 13.0.2
- Angular: 13.1.1
Describe the bug
Navigation for a page-router-outlet is not working anymore after navigating back from details view.
I have a navigation setup with nested page-router-outlets, much like this example, except the children (player details and team details) are also lazy loaded modules with their own routes.
After starting the app, and the tabs are loaded with their lazy loaded module, I can navigate to the details view and back. However, when I try to navigate to the details view again, there's no response. I have enabled tracing on the router, and there are no events fired when navigating back. Also no events are fired on new navigation attempts.
If I navigate to another tab, I can repeat the process. Then that will be "stuck" as well.
To Reproduce
Use the example from the link above and lazy load the details components.
Expected behavior
Navigation should keep working regardless of lazy loaded children.
Sample project
Additional context
This was working in @nativescript/angular 13.0.1, but then with issues like #49 and #53
貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
研究方向
從連結的 ns-login-tab-navigation-ng13 範例開始,調整其巢狀的 page-router-outlet 設定,讓球員和球隊詳細資料能夠延遲載入。在追蹤路由器事件的同時,比較 @nativescript/angular 13.0.1 與 13.0.2 之間的行為;完成的標準是:在各個分頁之間反覆導覽至詳細資料再返回仍能正常運作。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- angular, typescript
- 領域
- mobile
- Issue 類型
- 缺陷
- 難度
- 4/5
- 預估耗時
- 3-5 天
- 活躍度
- 停滯
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100