You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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.
I'm submitting a ...
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.
My vote is for the URLSearchParams version of course.
The text was updated successfully, but these errors were encountered: