NativeScript / NativeScript/angular
Navigation and nested page-router-outlet with lazy loaded children
Nessuno ha ancora preso questa issue.
- Lingua principale
- TypeScript
- Stelle
- 55
- Fork
- 13
- Merge medio
- 16m
- PR unite (30g)
- 1
Descrizione
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
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Inizia con l’esempio collegato ns-login-tab-navigation-ng13 e adatta la configurazione annidata di page-router-outlet in modo che i dettagli di giocatori e squadre vengano caricati lazy. Confronta il comportamento tra @nativescript/angular 13.0.1 e 13.0.2 mentre tracci gli eventi del router; il lavoro è completo quando la navigazione ai dettagli e il ritorno continuano a funzionare ripetutamente tra le schede.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- angular, typescript
- Ambito
- mobile
- Tipo di issue
- Bug
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 35/100