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

Properly model querystring input which can contain multiple values #9138

Closed
2 tasks done
xealot opened this issue Jun 10, 2016 · 3 comments
Closed
2 tasks done

Properly model querystring input which can contain multiple values #9138

xealot opened this issue Jun 10, 2016 · 3 comments

Comments

@xealot
Copy link

xealot commented Jun 10, 2016

I'm submitting a ...

  • bug report
  • feature request

Current behavior

In the old router, the new router and the very new router querystring parameters always are accessible as {[k:string]:string}. To pass an array of values via the querystring we have to rely on encoding within the application to serialize and then deserialize the array. We should be able to simply rely on existing URL standard behavior.

Adding to my frustration, there is already a class, URLSearchParams that fully models the querystring but seems unused when retrieving url search params from the router.
https://angular.io/docs/ts/latest/api/http/URLSearchParams-class.html

Expected/desired behavior

When retrieving data parsed from a querystring it should be presented either in a datastructure that supports the standard or in a class that models it properly.

const q: Observable<URLSearchParams> = r.routerState.queryParams;
const q: Observable<{[k:string]:string[]}> = r.routerState.queryParams;

My vote is for the URLSearchParams version of course.

@xealot
Copy link
Author

xealot commented Jun 10, 2016

Cross posted to https://github.com/angular/vladivostok/issues/35

@pkozlowski-opensource
Copy link
Member

There is no point of duplicating it here if it was reported in angular/vladivostok#35 where the new router lives.

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 8, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants