NativeScript / NativeScript/angular

angular 14+ modal back navigation issue

Open
#106 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
55
Forks
13
Avg merge
16m
Merged PRs (30d)
1

Description

Environment

  • CLI: 8.4.0
  • Cross-platform modules: 8.4.0
  • Android Runtime: 8.4.0
  • iOS Runtime: 8.4.1
  • NativeScript-Angular: 14+
  • Angular: 14+

After closing a modal (contains page-router-outlet) in the second screen and navigating back to Home Screen, then automatically runs a new Home Screen navigation.

I checked with the navigationTo event: it fires like forward navigation too.
navigatedTo event in Home Screen after closing modal and navigating back (event fires twice):

  1. isBackNavigation: false
  2. isBackNavigation: true

This happens on android and on ios.
The latest version of Angular 13 and @nativescript/angular 13 is working fine, but nothing above it.

Sample project
https://github.com/BalintVegh/ns-angular-modal-issue

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked sample project and reproduce closing the modal, returning to Home Screen, and the duplicate navigation events on Angular 14+ and NativeScript-Angular 14+. Compare the behavior with Angular 13, and consider the issue resolved when back navigation no longer triggers an extra Home Screen navigation or duplicate events on Android and iOS.

Written by the indexing model from the issue text.

Assessment

Tech stack
angular, typescript
Domain
mobile-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.