Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

111
Views
Using local storage on Angular

I'm trying to make a simple phonebook using Angular, but I'm struggling with making my "app" store the information inserted to local storage.

Here is what I have so far, so if anyone has time to take a peak, I would appreciate it very much.

https://easyupload.io/m/uk7r3f

about 4 years ago · Santiago Trujillo
3 answers
Answer question

0

The following snippet accesses the current domain's local Storage object and adds a data item to it using Storage.setItem().

localStorage.setItem('myCat', 'Tom');

The syntax for reading the localStorage item is as follows:

const cat = localStorage.getItem('myCat');

The syntax for removing the localStorage item is as follows:

localStorage.removeItem('myCat');

The syntax for removing all the localStorage items is as follows:

localStorage.clear();

Note: Please refer to the Using the Web Storage API article for a full example.

Source: https://developer.mozilla.org/en-US/docs/Web/API/Window/localStorage#example

about 4 years ago · Santiago Trujillo Report

0

you can use setItem, getItem, removeItem methods to perform CRUD operation using localStorage

   localStorage.setItem('key', 'value');

For more information you can follow: Add DATA in localStorage

about 4 years ago · Santiago Trujillo Report

0

localStorage.setItem('key', 'value') = > allows you to store an item in the browser storage

localStorage.getItem('key') = > allows you to read the value for the specified key item from the browser storage. for more information : https://www.journaldunet.fr/web-tech/developpement/1441263-comment-gerer-le-stockage-en-local-dans-la-session-d-un-navigateur-avec-angular/

about 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!