How can I save data in js without getting stuck when the page is reloaded? ANGULAR

0

I am creating an application but I need that the objects that are inside an array are not lost if the page is reloaded, I do not know if it is possible through an angle service, or through some function.

Thanks and Regards

    
asked by Alejo Florez 11.12.2017 в 20:28
source

1 answer

4

You could work with localstorage (JS-Native):

localStorage.setItem('miGato', 'Juan');

Or use a package for angular, ex:

answered by 11.12.2017 / 21:04
source