bug: ionViewWillEnter not fired after pop
Type: bug
Ionic Version: 2.x
Platform: all
Hi,
after pushing a page and pop with back button ionViewWillEnter() is not fired. Or is there another trigger? I would like to update some data on root page.
Thx Appwrx
Please, can you follow the issue template? otherwise I don't even know what version are you using Also, can you provide some code that reproduces the issue?
I used the bugreporter and thought it will be ok, sorry.
Short description of the problem:
After pushing a page and return by clicking back button the ionViewWillEnter function is not fired.
What behavior are you expecting?
Call ionViewWillEnter or introduce a other way to update data
Steps to reproduce:
- Push a page
- Return to first page
Which Ionic Version? 2.0 RC0
Plunker
http://plnkr.co/edit/6rebCvyOqGggys6fUDEp?p=preview
Info
Cordova CLI: 6.3.1
Gulp version: CLI version 3.9.0
Gulp local:
Ionic Framework Version: 2.0.0-rc.0
Ionic CLI Version: 2.1.1
Ionic App Lib Version: 2.1.1
Ionic App Scripts Version: 0.0.36
ios-deploy version: 1.8.2
ios-sim version: 4.1.1
OS: Mac OS X Sierra
Node Version: v6.7.0
Xcode version: Xcode 8.0 Build version 8A218a
Can you guys try against nightly?
npm install ionic-angular@nightly --save
same like before :(
Cordova CLI: 6.3.1
Gulp version: CLI version 3.9.0
Gulp local:
Ionic Framework Version: 2.0.0-rc.1-201610241941
Ionic CLI Version: 2.1.1
Ionic App Lib Version: 2.1.1
Ionic App Scripts Version: 0.0.36
ios-deploy version: 1.8.2
ios-sim version: 4.1.1
OS: Mac OS X Sierra
Node Version: v6.7.0
Xcode version: Xcode 8.0 Build version 8A218a
@appwrx I was able to reproduce your bug. It will be fixed once this PR is merged! https://github.com/driftyco/ionic/pull/9033
Perfect :) thank you!
I also have exactly the same issue. I couldn't find solution. ionViewWillEnter() not called when page is poped.
I am also facing one more issue LocalStorage. storing data in local storage and at next line fetching data not getting updated data.
- service.ts import { Storage } from '@ionic/storage'; import { Injectable } from "@angular/core"; import { Http, Headers, RequestOptions } from '@angular/http'; import 'rxjs/add/operator/map';
@Injectable()
export class Data{
constructor(public storage: Storage, public http: Http){ }
getLocal(){ return this.storage.get('local'); }
setLocal(data){ let formatToJson = JSON.stringify(data); this.storage.set('local', formatToJson); }
}
2. anypage.ts
this.dataService.setLocal(data); /* I set the data here*/
/*At next line fetching data that i set, But not getting set data.
this.dataService.getLocal().then((data) => {
if(data){ this.localData = JSON.parse(data); }
});
Same issue. Hoping for a quick fix.
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.