Nativescript-angular: Navigation between page-router-outlet

Created on 3 Sep 2019  路  3Comments  路  Source: NativeScript/nativescript-angular

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: 6.0.2
  • Cross-platform modules:
  • Android Runtime: 6.0.7
  • iOS Runtime: 6.0.2
  • Plugin(s):

"dependencies": {
"@angular/animations": "8.0.0",
"@angular/common": "8.0.0",
"@angular/compiler": "8.0.0",
"@angular/core": "8.0.0",
"@angular/forms": "8.0.0",
"@angular/http": "8.0.0-beta.10",
"@angular/platform-browser": "8.0.0",
"@angular/platform-browser-dynamic": "8.0.0",
"@angular/router": "8.0.0",
"@nstudio/nativescript-checkbox": "^1.0.0",
"@nstudio/nativescript-pulltorefresh": "^1.0.1",
"nativescript": "^6.1.0-2019-07-22-110314-13705",
"nativescript-accordion": "^6.0.0-beta.2",
"nativescript-angular": "8.0.2",
"nativescript-background-http": "^3.4.1",
"nativescript-camera": "^4.5.0",
"nativescript-drawingpad": "^3.1.0",
"nativescript-drop-down": "^5.0.2",
"nativescript-fancyalert": "^3.0.9",
"nativescript-image-swipe": "^5.0.1",
"nativescript-localstorage": "^2.0.0",
"nativescript-svg": "^1.3.7",
"nativescript-theme-core": "^1.0.6",
"nativescript-ui-listview": "7.0.0",
"nativescript-ui-sidedrawer": "7.0.0",
"nativescript-websockets": "^1.5.3",
"reflect-metadata": "~0.1.12",
"rxjs": "^6.5.2",
"tns-android": "^6.1.0-2019-07-19-113003-02",
"tns-core-modules": "^6.0.1",
"zone.js": "0.9.1"
},
"devDependencies": {
"@angular/compiler-cli": "8.0.0",
"@nativescript/schematics": "~0.5.0",
"@ngtools/webpack": "8.0.0",
"nativescript-dev-webpack": "~1.1.0",
"typescript": "3.4.5"
},

Describe the bug

When i try navigate from tab child (detail) to another tab child (detail) does not work

To Reproduce

Click in "GO TO TABS PAGE", open player two, click on teams tab, open some team, try navigate to player 1 detail (last button)

I can only navigate to players, but i cant navigate a specific player

Expected behavior

Sample project

Example: https://play.nativescript.org/?template=play-ng&id=lTchXt

Additional context

I tried this issue, but dos not work:
https://github.com/NativeScript/nativescript-angular/issues/1022

All 3 comments

Hi @PabloPG,
I reviewed your project and the issue seems to be related to the path. Try the following setup of the navigate method:

this.routerExtension.navigate(["/tabs", { outlets: { playerTab: ["players", "player", 1] } }]);

For your convinience, I am attaching also the project with some edits.

HI @PabloPG,
Were you able to test the above-given solution on your side?

Sorry for the delay in returning.

I tested on my project passing the parameters as recommended and it worked correctly.
Thank you very much.

I had created a queryParams with a redirect field and as a value to where to redirect 馃憤

Was this page helpful?
0 / 5 - 0 ratings