NativeScript / NativeScript/angular

Navigation and nested page-router-outlet with lazy loaded children

Ouverte
#57 4 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Personne n'a encore pris cette issue.

Langage dominant
TypeScript
Étoiles
55
Forks
13
Merge moyen
16 min
PR mergées (30 j)
1

Description

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

Guide de contribution

Ouvrir le guide de contribution

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Piste de recherche

Commencez par l’exemple lié ns-login-tab-navigation-ng13 et adaptez sa configuration imbriquée de page-router-outlet afin que les détails des joueurs et des équipes soient chargés paresseusement. Comparez le comportement entre @nativescript/angular 13.0.1 et 13.0.2 tout en traçant les événements du routeur ; le travail est considéré comme terminé lorsque la navigation vers les détails, puis le retour, continue de fonctionner de manière répétée entre les onglets.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
angular, typescript
Domaine
mobile
Type d'issue
Bug
Difficulté
4/5
Temps estimé
3-5 jours
Activité
À l'abandon
Clarté
Plutôt claire
Accessibilité débutants
35/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.