ionic-team / ionic-team/ionic-framework

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

Aperta
#30,644 3 commenti 2 reazioni 0 assegnatari Vedi su GitHub
triage
Lingua principale
TypeScript
Stelle
52.7k
Fork
13.3k
Merge medio
1g 15h
PR unite (30g)
51

Descrizione

### 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_

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.