You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 4, 2022. It is now read-only.
I'm submitting a ... (check one with "x")
[X ] bug report
[ ] feature request
Current behavior:
ionViewWillLeave is called twice on a component.
Expected behavior:
ionViewWillLeave should be called only once.
Steps to reproduce:
Root Page A
Push Page B
Push Page C -> WillLeave is called once on Page B
Change Root to Page D -> WillLeave is called again on Page B
,,.
Related code:
this.navCtrl.push(PageB);
this.navCtrl.push(PageC);
this.navCtrl.setRoot(PageD);
Other information:
When we push a page, willLeave is called on the previous active view (and it stays in the stack of pages). Then, when we call setRoot, the method _postViewInit (in nav-controller-base) call willLeave again on the view that it destroys, even if they werent the active view and their willLeave was already called.
Ionic info: (run ionic info from a terminal/cmd prompt and paste output below):
cli packages: (C:\Users\jeavia1\AppData\Roaming\npm\node_modules)
Original issue by @jcviau on 2018-01-27T00:03:20Z
Ionic version: (check one with "x")
(For Ionic 1.x issues, please use https://github.com/ionic-team/ionic-v1)
[ ] 2.x
[X ] 3.x
[ ] 4.x
I'm submitting a ... (check one with "x")
[X ] bug report
[ ] feature request
Current behavior:
ionViewWillLeave is called twice on a component.
Expected behavior:
ionViewWillLeave should be called only once.
Steps to reproduce:
Root Page A
Push Page B
Push Page C -> WillLeave is called once on Page B
Change Root to Page D -> WillLeave is called again on Page B
,,.
Related code:
this.navCtrl.push(PageB);
this.navCtrl.push(PageC);
this.navCtrl.setRoot(PageD);
Other information:
When we push a page, willLeave is called on the previous active view (and it stays in the stack of pages). Then, when we call setRoot, the method _postViewInit (in nav-controller-base) call willLeave again on the view that it destroys, even if they werent the active view and their willLeave was already called.
Ionic info: (run
ionic info
from a terminal/cmd prompt and paste output below):cli packages: (C:\Users\jeavia1\AppData\Roaming\npm\node_modules)
global packages:
local packages:
System:
Environment Variables:
Misc:
The text was updated successfully, but these errors were encountered: