Open hackel opened 8 years ago
Could you provide a minimal example that fails?
I am an issue with strings stored in sessionStorage as well. Here are the steps to repro:
Is there a way to turn off the auto syncying behavior, or any other workarounds anyone can suggest?
Proper solution would be to put try/catch around serialization/deserialization. Will be done.
This isn't fixed yet.
I'm using ngStorage with Satellizer, and because Satellizer stores a token in localStorage as a plain, unquoted string, I get a parsing error when ngStorage attempts to sync this value. This started happening when I changed the prefix ngStorage is using to match Satellizer. I will change it back and use different prefixes for now, but this work-around is sub-optimal.
It would be great if it was either possible to store plain strings, or just to exclude certain keys from syncing. I realise that I can write my own serializer to accomplish this, and that's another approach I may investigate, but it seems like this is a common enough issue that the functionality should be built-in.