Closed SeanProulx closed 8 years ago
Solved this issue by implementing something similar to what @tmcgee123 posted, except we're using the $cookies service instead.
Thanks again for the lib and hard work! A+
Sweet! Glad someone else was able to use it!!
Cheers guys :+1:
Where can I find what @tmcgee123 posted? We are having the same issue. I'm assuming this polyfill is what is being referenced? If so can we get this incorporated into angular locker in some way?
here is the gist https://gist.github.com/tmcgee123/c25325d70277b2ee3f3a
it's not really something that should go in the lib itself though
@tymondesigns understood :+1:
Not sure if this works. https://gist.github.com/tmcgee123/c25325d70277b2ee3f3a
LockerFallback is never called in Private Browsing.
@seven-cd That is sheerly a decorator for the service, so anyone could take it and simply include the module in their application and it will override the locker provider. If you are not familiar with decorators, here's the link: https://docs.angularjs.org/api/auto/service/$provide#decorator
All you have to do is include the code in your application then inject the module to where you are bootstrapping angular-locker currently.
Is the decoration approach still how this is done? I thought I read somewhere that this issue had been fixed and merged, but can't to find back to it. Also, it seems to not work with 2.0.4. Looking further into it now,
And, @tymondesigns, if I understand you correctly, fallback to cookie driver (or whatever) where other drivers are not supported (like Safari private mode) is not considered the scope of Locker, and should be handled in all applications needed to support missing localStorage support? IE. a feature, not a bug?
We need to be able to support Safari private browsing in our project but if the storage isn't supported, the browser just throws a JS exception and our angular app doesn't initialize. I've noticed the use of Remy's Polyfill but is this just a plug and play script? How exactly am I supposed to use this in a project?
Currently we fallback to $cookies using locker.isSupported() but I don't understand the point of this function if I can't call or check it?