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

Support array state parameters #373

Closed
jyboudreau opened this issue Sep 2, 2013 · 6 comments
Closed

Support array state parameters #373

jyboudreau opened this issue Sep 2, 2013 · 6 comments
Labels
Milestone

Comments

@jyboudreau
Copy link

Angular $location has support for setting/getting query parameters that are repeated and treat them as arrays. It would be great to have this supported in ui-router.

Some example usage:

var arrayState = {
    // ...
    url: "/index?array"  // or via params
}

// Activating the state
$state.go(arrayState, {array: ["1", "2", "3"]});

// ... would change the location to /index?array=1&array=2&array=3

$stateParams.array would also be constructed from the location into an array of course.

@jyboudreau jyboudreau reopened this Sep 4, 2013
@jyboudreau
Copy link
Author

Oops.

@lexmuc
Copy link

lexmuc commented Apr 3, 2014

I would also really appreciate this feature!

@nateabele
Copy link
Contributor

Patches are welcome. 👍

@felixfbecker
Copy link

Is there any way to disable this? I want to encode JSON in query parameters with a custom type handler, but this handling causes arrays to be handled as multiple query params instead of one JSON query param.

@stolenhead
Copy link

hi is there a way to receive a param join with commas ? like: "?person=5b3ef51a9f929066765bb07e,5b3ef50d9f929066764ec006"
thanks

@aisimon
Copy link

aisimon commented Jun 18, 2020

Urlencode it then you can receive it right ?

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

No branches or pull requests

7 participants