Skip to content

bug: Properties ionNavWillChange and ionNavDidChange do not exist on IonNav #29114

@gerhardboer

Description

@gerhardboer

Prerequisites

Ionic Framework Version

v7.x

Current Behavior

When upgrading to latest Ionic (v7.7.3) the build fails with error:

 error TS2339: Property 'ionNavDidChange' does not exist on type 'IonNav'. 44 this.ionNav.ionNavDidChange.subscribe(async () => { ~~~~~~~~~~~~~~~ 

Expected Behavior

This was not added to the breaking changes, and is still referenced in the documentation.
so the code should still work

Steps to Reproduce

  1. create a property of type IonNav
  2. try to access ionNavDidChange
  3. (IDE will probably error here)
  4. run build

Code Reproduction URL

https://stackblitz.com/edit/ionic-ion-nav-issue-reproduction?file=src%2Fmain.ts

Ionic Info

Ionic:

Ionic CLI : 5.4.16

Utility:

cordova-res : not installed
native-run : not installed

System:

NodeJS : v21.1.0
npm : 10.2.5
OS : macOS Unknown

Additional Information

Bug was already mentioned in #28863 but closed without checking it properly.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions