ionic-team / ionic-team/ionic-framework

bug: Ionic life cycle hooks are not triggering in routed component

Abierto
#30,644 3 comentarios 2 reacciones 0 asignados Ver en GitHub
triage
Lenguaje dominante
TypeScript
Estrellas
52.7k
Forks
13.3k
Merge medio
1 d 15 h
PR fusionados (30 d)
51

Descripción

### Prerequisites

- [x] I have read the [Contributing Guidelines](https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#creating-an-issue).
- [x] I agree to follow the [Code of Conduct](https://ionicframework.com/code-of-conduct).
- [x] I have searched for [existing issues](https://github.com/ionic-team/ionic-framework/issues) that already report this problem, without success.

### Ionic Framework Version

v8.x

### Current Behavior

Image

"When I navigate from A(III) to B and then back to A(III), the Ionic lifecycle hooks inside A(III) are not being called, but the lifecycle hooks of Page A are being triggered.

### Expected Behavior

Expecting Life cycle hooks in page A (III) to be triggered.

### Steps to Reproduce

_Note: Please keep browser console open to view the logs_

1. Go to page A (Now, in my demo application it will navigate to page A(III) by default in page A)
2. Now from A(III), go to page B
3. Now go back with browser back navigation to page A(III)

Now, If you see the browser you can only see page A ionViewWillEnter is only being triggered, but page A(III) ionViewWillEnter didn't triggered

### Code Reproduction URL

https://stackblitz.com/github/Av1nag/ionic-routing-demo-app

### Ionic Info

Ionic:

Ionic CLI : 7.2.0 (/Users/avinag/.nvm/versions/node/v18.20.5/lib/node_modules/@ionic/cli)
Ionic Framework : @ionic/angular 8.7.2
@angular-devkit/build-angular : 20.1.6
@angular-devkit/schematics : 20.1.6
@angular/cli : 20.1.6
@ionic/angular-toolkit : 12.3.0

Utility:

cordova-res : 0.15.4
native-run : 2.0.1

System:

NodeJS : v18.20.5 (/Users/avinag/.nvm/versions/node/v18.20.5/bin/node)
npm : 10.9.1
OS : macOS Unknown

### Additional Information

_No response_

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.