nativescript-angular
nativescript-angular copied to clipboard
RouterExtensions.navigateByURL() broken when passing queryParams
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.