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

Allow "random" optional parameters in url #1401

Closed
RodolpheGohard opened this issue Sep 25, 2014 · 1 comment
Closed

Allow "random" optional parameters in url #1401

RodolpheGohard opened this issue Sep 25, 2014 · 1 comment

Comments

@RodolpheGohard
Copy link

I need to use optional parameters in my URLs, such as:

example.org/#search?text=optional%20params&orderBy=DATE

here, either text or orderBy are optional and can be independently present. So that won't allow constructions like search/:text/:orderBy.

And the parameters are absent from $state.params or $stateParams.

I have to use $locationChangeSuccess events combined $location.search() and
it's not practical at all. Partly because it fires before state changes.

It would be neat if there were an event like $stateUpdated, and also if
optional parameters were included in $stateParams.
Or maybe there's already some mechanism for this in UI router, if so please
tell me.

@christopherthielen
Copy link
Contributor

Optional params were added in 0.2.11 with little fanfare.
#1032

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

No branches or pull requests

2 participants