Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Modal route issue - route runs twice when returning from second modal containing route outlet

Open
#96 1 comment 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

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

Research direction

Start with the NSRouteReuseStrategy.shouldDetach method and compare it with the earlier implementation in commit beb cde23c4d6a392638c23ec1e2bc63b06a9b43e. Reproduce the numbered flow in the linked StackBlitz demo on iOS, including returning from the second modal containing a route outlet. Done means the step-five back navigation runs its animation once rather than backwards and forwards.

Written by the indexing model from the issue text.

Description

This is most evident in iOS. I've set up a demo app:

https://stackblitz.com/edit/nativescript-stackblitz-templates-vwcmqt

In iOS, if you follow the steps (they're numbered) you'll see that when you navigate back on step five, the animation runs twice—backwards then forwards. This appears to come from the shouldDetach method NSRouteReuseStrategy. If I use the previous code for shouldDetatch that was altered here:

https://github.com/NativeScript/angular/commit/bebcde23c4d6a392638c23ec1e2bc63b06a9b43e

then it works without problem.

NOTE: For this demo, I've used 14.2.6-alpha.0 because without it, I can't use modals with ModalDialogParams because of injector scope issues. However, this router problem described above also occurs in 14.2.5 when the modal corrections are in place. Either way, something isn't working as it should.

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

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.

More from NativeScript/angular

All issues in NativeScript/angular

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.