NativeScript / NativeScript/angular

Bug: Named Outlet non responsive after `clearHistory` navigation

Open
#39 7 comments 1 reaction 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
Provide version numbers for the following components (information can be retrieved by running tns info in your project folder or by inspecting the package.json of the project):

  • CLI: 8.1.3
  • Cross-platform modules: NA
  • Android Runtime: 8.1.1
  • iOS Runtime: Not Tested
  • Plugin(s): @nativescript-community/ui-material-bottomnavigationbar
  • NativeScript-Angular: 12.2.0
  • Angular: 12.2.0

Describe the bug
When navigating to a nested route (one with a named outlet) after a clearHistory a navigation event would fire, but the outlet would not be updated

To Reproduce
Clone https://github.com/herefishyfish/named-router-navigation-bug
Start Android application
Press "Go to dashboard"
Press "Nested route in navbar"
Press Notifications tab
Press Todos tab
Press "Nested route in navbar"

Expected behavior
For the second press of Nested route in navbar to navigate to the nested route.

Sample project
https://github.com/herefishyfish/named-router-navigation-bug

Additional context
There was a few messages in Discord about this:
https://discord.com/channels/603595811204366337/606457628729671691/895530953068408894

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

Clone the linked named-router-navigation-bug sample and run it on Android. Follow the listed navigation sequence, then trace the NativeScript Angular routing and named-outlet handling involved in clearHistory. Done means the second “Nested route in navbar” press updates the nested route and the relevant navigation behavior is covered by a regression check.

Written by the indexing model from the issue text.

Assessment

Tech stack
angular, typescript
Domain
mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 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.