angular-local-storage
angular-local-storage copied to clipboard
Any way to extract the current locale from storage
I'm using webpack and therefore tmhDynamicLocaleProvider.useCookieStorage(); does not help at config.
Is there a way to extract the current locale ID from storage?
Best, Ali
From angular-dynamic-locale's documentation
It is possible to ask the storage to be $cookieStore using the shortcut tmhDynamicLocaleProvider.useCookieStorage(), internally this is exactly as performing tmhDynamicLocaleProvider.useStorage('$cookieStore')
Reading their source code,
storage = $injector.get(storageFactory);
where storageFactory
is the name of the storage service. I have not yet used their library but try using
tmhDynamicLocaleProvider.useStorage('localStorageService')