-
Notifications
You must be signed in to change notification settings - Fork 3k
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
ui-sref-active does not work with state that have an array as a parameter #2696
Comments
I have also tried creating a custom type. But this does not work as well
|
I can confirm this issue. but I have one correction to it.
with passed params ui-sref-active does not work. without all is OK |
This is a bug in return params ? equalForKeys(state.params.$$values(params), $stateParams, objectKeys(params)) : true; This code does == comparison, which obviously doesn't work for arrays. function equalForKeys(a, b, keys) {
if (!keys) {
keys = [];
for (var n in a) keys.push(n); // Used instead of Object.keys() for IE8 compatibility
}
for (var i=0; i<keys.length; i++) {
var k = keys[i];
if (a[k] != b[k]) return false; // Not '===', values aren't necessarily normalized
}
return true;
} |
@christopherthielen could you please post here a ping message when 0.3.2 will be released? |
Hi there! @christopherthielen do you have any news on this? Thanks in advance |
@ZuBB Could you PR this please? It would unblock both you and I since we are both waiting on |
@zeusdeux I am sorry I am a bit busy right now and quite possibly for next month too. maybe after that. |
…ing `==`) - Allows .includes() to match when a param value is non-primitive and == is not useful (such as an array) Closes #2696
closed by 6958c24 |
0.3.2 released |
You should be careful with these changes. For us this was a breaking change as we were using I've also noticed the change was only applied to the |
@joaovieira sorry about that. It's hard to tell which broken behaviors people rely on "in the wild". But the old behavior was definitely wrong, because it didn't work at all for object typed parameters. It was also inconsistent with the parameter equality checking in transitionTo. I wonder how this affected your app?
Hmm, this delegates to the parameter's
Definitely, that is a problem. I will open a new issue to track it. #3154 Thanks for reporting it! |
Given a state with param of type array
The active class is not added on the html element when we navigate to the state
The text was updated successfully, but these errors were encountered: