ngStorage icon indicating copy to clipboard operation
ngStorage copied to clipboard

Parse error when an unquoted string is stored in localStorage

Open hackel opened this issue 8 years ago • 4 comments

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.

hackel avatar Mar 10 '16 03:03 hackel