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

RouterExtensions.navigateByURL() broken when passing queryParams #2350

Open
jalberto-ghub opened this issue May 7, 2021 · 0 comments
Open

Comments

@jalberto-ghub
Copy link

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: 7.2.1
  • Cross-platform modules: 7.1.4
  • Android Runtime: 7.0.1
  • iOS Runtime: 7.2.0
  • Plugin(s):
  • NativeScript-Angular: 10.1.7
  • Angular: 10.2.x

Describe the bug

The options are not passed to the Angular router, which means there is no way to specify NavigationExtras on file router-extensions.js here:

public navigateByUrl(url: string | UrlTree, options?: NavigationOptions): Promise<boolean> { if (options) { this.locationStrategy._setNavigationOptions(options); } return this.router.navigateByUrl(url); }
To Reproduce

Try passing query parameters on this call, you will see they are not available to your ActivatedRouteSnapshot on your routes or guards. All the options for NavigationExtras are ignored.

Expected behavior
The query parameters should be available.

Additional context
It is broken on the latest version of N8 also.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant