Search Posts

Category: ng-storage

ngstorage’s $localStorage still available in angular after deleting browser data

I am using ngStorage for storing data in local storage. I am facing this weird issue where, when I am deleting the localstorage from the browser, my website’s user doesn’t get logged out on url change. Here’s the code that keeps the check whether the localstorage exists or not and then does the appropriate route: $rootScope.$on(‘$locationChangeStart’, function (event, next, current) { //it always by passes this if (!$localStorage.currentUser) { $location.path(‘/login’); } }); Only when I […]

Is it possible to store the translation table in localstorage with angular-translate for an offline use of my app?

I’m developing a multi-language app with Ionic and angular-translate. I get the translation table from a server with $translateProvider.useStaticFilesLoader. It works like a charm as long as the app has an internet connection. The problem is that the client could use the app offline and of course, when you launch the app without internet, it breaks cause translations are not available. Does anyone knows if it’s possible to store the translation table in localstorage (or […]