Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: ionViewWillEnter not fired after pop #8842

Closed
aexei opened this issue Oct 21, 2016 · 10 comments · Fixed by #9033
Closed

bug: ionViewWillEnter not fired after pop #8842

aexei opened this issue Oct 21, 2016 · 10 comments · Fixed by #9033
Assignees

Comments

@aexei
Copy link

aexei commented Oct 21, 2016

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

@manucorporat
Copy link
Contributor

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?

@manucorporat manucorporat self-assigned this Oct 21, 2016
@aexei
Copy link
Author

aexei commented Oct 24, 2016

I used the bugreporter and thought it will be ok, sorry.

@aexei
Copy link
Author

aexei commented Oct 24, 2016

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:

  1. Push a page
  2. 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

@manucorporat
Copy link
Contributor

Can you guys try against nightly?

npm install ionic-angular@nightly --save

@aexei
Copy link
Author

aexei commented Oct 27, 2016

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

@manucorporat
Copy link
Contributor

@appwrx I was able to reproduce your bug. It will be fixed once this PR is merged!
#9033

@aexei
Copy link
Author

aexei commented Nov 5, 2016

Perfect :) thank you!

manucorporat added a commit to manucorporat/ionic that referenced this issue Nov 11, 2016
manucorporat added a commit to manucorporat/ionic that referenced this issue Nov 11, 2016
manucorporat added a commit to manucorporat/ionic that referenced this issue Nov 11, 2016
manucorporat added a commit to manucorporat/ionic that referenced this issue Nov 14, 2016
@farhaan008
Copy link

farhaan008 commented Mar 1, 2017

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.

  1. 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); }
});

@rhartvig
Copy link

Same issue. Hoping for a quick fix.

@ionitron-bot
Copy link

ionitron-bot bot commented Sep 3, 2018

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.

@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Sep 3, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants