ionic-framework icon indicating copy to clipboard operation
ionic-framework copied to clipboard

bug: ionViewWillEnter not fired after pop

Open aexei opened this issue 10 years ago • 10 comments

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

aexei avatar Oct 21 '16 17:10 aexei

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 avatar Oct 21 '16 21:10 manucorporat

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

aexei avatar Oct 24 '16 14:10 aexei

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

aexei avatar Oct 24 '16 14:10 aexei

Can you guys try against nightly?

npm install ionic-angular@nightly --save

manucorporat avatar Oct 24 '16 20:10 manucorporat

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

aexei avatar Oct 27 '16 09:10 aexei

@appwrx I was able to reproduce your bug. It will be fixed once this PR is merged! https://github.com/driftyco/ionic/pull/9033

manucorporat avatar Nov 05 '16 20:11 manucorporat

Perfect :) thank you!

aexei avatar Nov 05 '16 20:11 aexei

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

farhaan008 avatar Mar 01 '17 10:03 farhaan008

Same issue. Hoping for a quick fix.

rhartvig avatar Apr 12 '17 19:04 rhartvig

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[bot] avatar Sep 03 '18 09:09 ionitron-bot[bot]