Ionic 4 Tabs Starter Problem/Question

#1

Hello, I have used the Ionic 4 tabs starter project and I have noticed that when I switch tabs that the tab pages are not reloaded each time I re-select the tabs. In ionic 3 I realize that I would use IonViewWillEnter() for things that I would need done on the page reload but now with Ionic 4 we do not have thar available anymore. I have tried using ngOnInit() and simple console.log statement and it only executes the first time that tab page loads.

My desire would be for the page to reload every time the tab is selected. I do not know if I am working against a Beta issue or if I am not seeing something in the documentation in regards to how I am supposed to set things up properly. Any direction would be most appreciated.

“dependencies”: {
@angular/common”: “~7.0.0”,
@angular/core”: “~7.0.0”,
@angular/forms”: “~7.0.0”,
@angular/http”: “~7.0.0”,
@angular/platform-browser”: “~7.0.0”,
@angular/platform-browser-dynamic”: “~7.0.0”,
@angular/router”: “~7.0.0”,
@ionic-native/core”: “5.0.0-beta.21”,
@ionic-native/splash-screen”: “5.0.0-beta.21”,
@ionic-native/status-bar”: “5.0.0-beta.21”,
@ionic/angular”: “4.0.0-beta.17”,
“core-js”: “^2.5.4”,
“rxjs”: “~6.3.3”,
“zone.js”: “~0.8.26”
},
“devDependencies”: {
@angular-devkit/architect”: “~0.10.0”,
@angular-devkit/build-angular”: “~0.10.0”,
@angular-devkit/core”: “~7.0.0”,
@angular-devkit/schematics”: “~7.0.0”,
@angular/cli”: “~7.0.0”,
@angular/compiler”: “~7.0.0”,
@angular/compiler-cli”: “~7.0.0”,
@angular/language-service”: “~7.0.0”,
@ionic/angular-toolkit”: “~1.2.0”,
@types/node”: “~10.12.0”,
@types/jasmine”: “~2.8.8”,
@types/jasminewd2”: “~2.0.3”,
“codelyzer”: “~4.5.0”,
“jasmine-core”: “~2.99.1”,
“jasmine-spec-reporter”: “~4.2.1”,
“karma”: “~3.0.0”,
“karma-chrome-launcher”: “~2.2.0”,
“karma-coverage-istanbul-reporter”: “~2.0.1”,
“karma-jasmine”: “~1.1.2”,
“karma-jasmine-html-reporter”: “^0.2.2”,
“protractor”: “~5.4.0”,
“ts-node”: “~7.0.0”,
“tslint”: “~5.11.0”,
“typescript”: “~3.1.6”
},

#2

Hi, did you find any solution on this ?

#3

Yes, you need to use the ionViewWillEnter() function. I was to the misunderstanding that this function was being removed in ionic 4 buy it has not.