NativeScript / NativeScript/angular

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

Aberta
#57 4 comentários 0 reações 0 responsáveis Ver no GitHub

Ninguém assumiu esta issue ainda.

Linguagem predominante
TypeScript
Estrelas
55
Forks
13
Merge médio
16min
PRs com merge (30d)
1

Descrição

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

Guia de contribuição

Abrir o guia de contribuição

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Direção de pesquisa

Comece com o exemplo vinculado ns-login-tab-navigation-ng13 e adapte sua configuração aninhada de page-router-outlet para que os detalhes de jogadores e equipes sejam carregados sob demanda. Compare o comportamento entre @nativescript/angular 13.0.1 e 13.0.2 enquanto rastreia os eventos do roteador; considera-se concluído quando navegar para os detalhes e voltar repetidamente continua funcionando entre as abas.

Escrita pelo modelo de indexação a partir do texto da issue.

Avaliação

Stack de tecnologia
angular, typescript
Domínio
mobile
Tipo de issue
Bug
Dificuldade
4/5
Tempo estimado
3-5 dias
Status de atividade
Estagnada
Clareza
Razoavelmente clara
Facilidade para iniciantes
35/100

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.