S
S
Stepan Kormilin2015-11-09 10:39:04
Angular
Stepan Kormilin, 2015-11-09 10:39:04

AngularJS + localstorage in what cases to use?

Such an example: I receive a large (well, or not always) json from the server, process it, scatter the data on the page. Then some user actions take place, after which I again need to request data for processing and displaying changes. Can I use local storage in this case? When should you use it at all, and when should you not?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
Y
Yaroslav Lyzlov, 2015-11-09
@dixoNich

When after the end of the session (reloading the page) you need some data not to be lost. If such a task is not worth it, then there is no need to use it. Store data in memory, angular has services for that.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question