Skip to content

State changes invoke twice because of URL parameter types #1461

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

Closed
amidudu opened this issue Oct 17, 2014 · 1 comment
Closed

State changes invoke twice because of URL parameter types #1461

amidudu opened this issue Oct 17, 2014 · 1 comment

Comments

@amidudu
Copy link

amidudu commented Oct 17, 2014

Hi,

Here is an example: http://plnkr.co/edit/26bmjaWkmRZhmED4l21o?p=info
Just press on the combo and select one of the options, there should be only one alert of state changes but thee will be two.

The reason is that the function "function equalForKeys(a, b, keys)" doesn't aware of the parameters types and while the above example use a boolean parameter inside the state, the string value of the boolean doesn't match.

Seems like this can be fixed by adding some kind of type checking.

In general ui router should "know" thew types of the parameters (arrays, strings...) so state parameters will always contain the real type and not the string representation

@christopherthielen
Copy link
Contributor

I built from master and updated your plunk: http://plnkr.co/edit/dF8KwC0gyZzyqp490BZb?p=preview

This will be fixed in upcoming 0.2.12 release.

closing via #1443

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

No branches or pull requests

2 participants