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
{{ message }}
This repository has been archived by the owner on Sep 20, 2020. It is now read-only.
Hi,
I have some problem with sticky mode in my app. I have many states based in tab elements. I want to save every view when I switch between tabs, but if I come back to some tab, state is not 'reactivate' but is 'updateStateParams'. Between states a pass by params some Object like { name: 'someName', age : 20, active : true}. When I switch between tabs I do not change anything in my params object. I discovered that in your sticky script stateParams are compared with inactiveState params. In my case compared objects are the same but in my opinion comparision method is wrong. It is some lines in sticky script (line 139):
if (!angular.equals(a[k], b[k])) return false; // Not '===', values aren't necessarily normalized
As I wrote I pass in params OBJECT not primitive. This code compare values only for primitives. For object I think should use e.g. angular.equals method. My object are equal but this script think that is not so return false what couses 'updateStateParams' transition (I think it is wrong because a do not change my params object).
So my question is...It is a bug or it is intentional to compare reference to object not value?
The text was updated successfully, but these errors were encountered:
I think this is a dupe of #239 and it is fixed in 0.0.15-pre2. Can you try the version found in the plunk for issue 239 and let me know if it works for you?
Hi,
I have some problem with sticky mode in my app. I have many states based in tab elements. I want to save every view when I switch between tabs, but if I come back to some tab, state is not 'reactivate' but is 'updateStateParams'. Between states a pass by params some Object like { name: 'someName', age : 20, active : true}. When I switch between tabs I do not change anything in my params object. I discovered that in your sticky script stateParams are compared with inactiveState params. In my case compared objects are the same but in my opinion comparision method is wrong. It is some lines in sticky script (line 139):
if (!angular.equals(a[k], b[k])) return false; // Not '===', values aren't necessarily normalized
As I wrote I pass in params OBJECT not primitive. This code compare values only for primitives. For object I think should use e.g. angular.equals method. My object are equal but this script think that is not so return false what couses 'updateStateParams' transition (I think it is wrong because a do not change my params object).
So my question is...It is a bug or it is intentional to compare reference to object not value?
The text was updated successfully, but these errors were encountered: