Questions tagged [angular-local-storage]

An AngularJS module that allows accessing the browser's local storage

angular-local-storage is an AngularJS module that allows you to access the local storage facilities in modern browsers in an Angular-like way.

175 questions
142
votes
10 answers

How to convert string to boolean in typescript Angular 4

I know am not the first to ask this and as I mentioned in my title ,I am trying to convert string value boolean . I have previously put some values into local storage,Now I want to get all the values and assign all to the some boolean variables…
Zhu
  • 3,679
  • 14
  • 45
  • 76
10
votes
6 answers

How to Set & Get in angular2-localstorage?

From this repo, I've successfully configured this: import {Component} from "angular2/core"; import {LocalStorageService} from "angular2-localstorage/LocalStorageEmitter"; @Component({ provider: [LocalStorageService] }) export class AppRoot{ …
Vicheanak
  • 6,444
  • 17
  • 64
  • 98
9
votes
1 answer

how to save and retrieve data from Angular2 local storage?

I was able store an auth token in the browser's localstorage, but I wasn't able retrieve it as string. I can't find any examples on how to do that.
Raj Kumar
  • 583
  • 2
  • 5
  • 9
8
votes
1 answer

angular-cache not working as expected

I was trying to use angular-cache module into my project but not sure it is working properly or not. Below is the code – angular.module('TrackerApp').factory('TrackerFactory', function ($resource, CacheFactory) { if…
6
votes
2 answers

Authentication as an anonymous user

I would like to reproduce how plunker manages the anonymous accounts. Plunker can recognise an anonymous user. For example, we can save a plunker as anonym and then freeze it. As a result, only the same user (before clearing browser history) has…
SoftTimur
  • 5,630
  • 38
  • 140
  • 292
6
votes
3 answers

How to persist selected language in LocalStorage while using Angular-translate?

I am new to angular-translate in my Angular app. Requirement : I have to create a multi language application in AngularJS where user has an option to set his language. So, for that I have to load translations from files and save that preferred…
Debug Diva
  • 26,058
  • 13
  • 70
  • 123
5
votes
3 answers

How to use localStorage in angular universal?

I am using @angular v4.0.3 and webpack 2.2.0. It was working fine using Auler post but as I included localStorage it stopped working. Is there any way to make it work or any module for localStorage in angular universal
5
votes
3 answers

can't logout from ionic

Hi I have an issue with ionic login and logout. Each time after logout, i can still click the back button and it will bring me back to my previous page. may i know how to clear or delete session when logout so that user unable to go back to previous…
davidlee
  • 5,611
  • 17
  • 56
  • 82
4
votes
4 answers

ERROR in Metadata version mismatch for module node_modules/angular-2-local-storage/dist/index.d.ts, found version 4, expected 3

I am using Angular2 application and getting below error with npm start command. this is whole codes ERROR in Metadata version mismatch for module /home/x/Desktop/koohbaad-web/node_modules/angular-2-local-storage/dist/index.d.ts, found version 4,…
Mojtaba Darzi
  • 328
  • 5
  • 10
4
votes
1 answer

localForage storage capacity

I'm using localForage in my Cordova application. I want to know the size of the localforage. Basically it is mentioned as 5mb limit. I will have more than 100mb data in my mobile application. var DefaultConfig = { description: '', driver:…
4
votes
1 answer

How to use ngStorage in angularjs

visit https://github.com/gsklee/ngStorage. My code has 2 partials, in partial1 I've 3 input box and data entered in them be 'abc', 'pqr', 'xyz' and on click of button I want to get redirected to partial2 where input box gets populated with following…
surbhi bakshi
  • 160
  • 1
  • 1
  • 17
4
votes
4 answers

ngStorage not working properly when redirect using window.location

I'm trying to do a redirect after set a $storage var, using ngStorage module. This is not working, and I can't find out why. My code is below: