ionic-framework: Selecting a Tab in Tabs do not trigger viewWillEnter lifecycle event

Ionic version: (check one with “x”) [ ] 1.x [ ] 2.x [x] 3.x

I’m submitting a … (check one with “x”) [x] bug report [ ] feature request [ ] support request => Please do not submit support requests here, use one of these channels: https://forum.ionicframework.com/ or http://ionicworldwide.herokuapp.com/

Current behavior:

Clicking tab buttons in the tabs component does not trigger App#viewWillEnter and other lifecycle events, except the first time the page is being loaded.

Expected behavior:

Every time selected tab changes in tabs component, lifecycle events get triggered on each tab’s view.

Steps to reproduce:

http://plnkr.co/edit/sJFO6E9cRUXeKWSXb1LZ?p=preview

Related code:

n/a

Other information:

Probably related: #9787.

Ionic info: (run ionic info from a terminal/cmd prompt and paste output below):

global packages:

    @ionic/cli-utils : 1.0.0
    Cordova CLI      : 7.0.1 
    Ionic CLI        : 3.0.0

local packages:

    @ionic/app-scripts              : 1.3.7
    @ionic/cli-plugin-cordova       : 1.0.0
    @ionic/cli-plugin-ionic-angular : 1.0.0
    Ionic Framework                 : ionic-angular 3.2.1

System:

    Node       : v6.10.3
    OS         : OS X El Capitan
    Xcode      : Xcode 8.2.1 Build version 8C1002 
    ios-deploy : 1.9.1 
    ios-sim    : 5.0.13 

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Reactions: 4
  • Comments: 16 (7 by maintainers)

Most upvoted comments

@Creawebs - we are not planning on having any more v3 releases of Ionic. You will need to retest this in v4 when it is released and then create a new issue if it is still a problem. The first BETA for v4 should be soon (within a few weeks).

That is a very important statement @Creawebs. I really wish this would be announced properly on the Ionic Website or blog. You are effectively ending any and all support for Ionic 3 (and previous), even before Ionic 4 is out. This is a very important decision that really ought to be communicated honestly and openly with everyone in a proper manner. Why even bother filing or commenting on v3 tickets then?

@mlynch The event ionViewCanLeave is indeed firing but the bug still remains where it actually does let you change the tab. It hasnt been fixed on the latest release.


    @ionic/cli-utils  : 1.19.0
    ionic (Ionic CLI) : 3.19.0

global packages:

    cordova (Cordova CLI) : not installed

local packages:

    @ionic/app-scripts : 3.1.6
    Cordova Platforms  : android 6.3.0
    Ionic Framework    : ionic-angular 3.9.2

@stalniy I am not sure if thats the case, as the router is in my opinion quite a big change.

@kensodemann Ionic has been my go to project for the past 3 years or so and I have always bet on ionic and pushed it forward in my teams, but somewhat ending support for v3 like this really makes me lose faith in the framework.

@loban ionic 4 + Angular has minor breaking changes (by minor, I mean changes in markup only). So, migration should not be a big deal

This has been fixed and will be in the next release.