I use some code in multiple pages, to store and retrive stuff from the local storage. I would like to create a class in order to wrap these function.
Where can I put it?
I’m using the last version of ionic.
Thank you
I recommend the usage of providers for that. You find a tutorial about providers (services) in an angular environment here:
https://angular.io/tutorial/toh-pt4
i agree. i just ported my ionic1 app to ionic2, and moved all the data handling functions to a singleton provider that uses rest web services to manage data from a mongo db server.
this is what i used to learn how