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: Properties ionNavWillChange and ionNavDidChange do not exist on IonNav #29114

Closed
3 tasks done
gerhardboer opened this issue Mar 5, 2024 · 5 comments · Fixed by #29122
Closed
3 tasks done

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

gerhardboer opened this issue Mar 5, 2024 · 5 comments · Fixed by #29122
Assignees
Labels
package: angular @ionic/angular package type: bug a confirmed bug report

Comments

@gerhardboer
Copy link

gerhardboer commented Mar 5, 2024

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.

@sean-perkins
Copy link
Contributor

Hello @gerhardboer thank you for this issue!

Here is a dev-build that adds the missing event properties to the Angular component wrapper for ion-nav:

npm install @ionic/angular@7.7.5-dev.11709823131.1d3df428

Let me know if you experience any issues, thanks!

@gerhardboer
Copy link
Author

@sean-perkins everything works great!
thanks for the fix, can't wait for the release so we can upgrade

@gerhardboer
Copy link
Author

do i close the issue or is that automatic when merged / released?

@thetaPC
Copy link
Contributor

thetaPC commented Mar 11, 2024

That's great to hear that the dev build worked! There's no need to close this issue since it'll be automatically closed when the pull request is merged. Thank you!

github-merge-queue bot pushed a commit that referenced this issue Mar 12, 2024
…29122)

Issue number: resolves #29114

---------

<!-- Please do not submit updates to dependencies unless it fixes an
issue. -->

<!-- Please try to limit your pull request to one type (bugfix, feature,
etc). Submit multiple pull requests if needed. -->

## What is the current behavior?
<!-- Please describe the current behavior that you are modifying. -->

The event types for `ion-nav` were not correctly applied to the angular
component wrapper.

## What is the new behavior?
<!-- Please describe the behavior or changes that are being added by
this PR. -->

- `ionNavWillChange` and `ionNavDidChange` event types are added to
`ion-nav` component wrapper in Angular.

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!--
  If this introduces a breaking change:
1. Describe the impact and migration path for existing applications
below.
  2. Update the BREAKING.md file with the breaking change.
3. Add "BREAKING CHANGE: [...]" to the commit description when merging.
See
https://github.com/ionic-team/ionic-framework/blob/main/.github/CONTRIBUTING.md#footer
for more information.
-->


## Other information

<!-- Any other information that is important to this PR such as
screenshots of how the component looks before and after the change. -->

Dev-build: `7.7.5-dev.11709823131.1d3df428`

Testing:
- Open reproduction on original issue
- Observe: Type errors for missing event properties 
- Install dev-build
- (May need to reload)
- Observe: Type errors are resolved
Copy link

ionitron-bot bot commented Apr 11, 2024

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 Apr 11, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
package: angular @ionic/angular package type: bug a confirmed bug report
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants