# Save data gotten form ion-input using localstorage

**URL:** <https://forum.ionicframework.com/t/save-data-gotten-form-ion-input-using-localstorage/145259>\
**Category:** ionic-v3\
**Created:** [October 22, 2018, 2:19pm UTC](https://forum.ionicframework.com/t/save-data-gotten-form-ion-input-using-localstorage/145259 "2018-10-22T14:19:59Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![beardedprince](https://avatars.discourse-cdn.com/v4/letter/b/e274bd/32.png) [@beardedprince](https://forum.ionicframework.com/u/beardedprince)\
**Post date:** [October 22, 2018, 2:19pm UTC](https://forum.ionicframework.com/t/save-data-gotten-form-ion-input-using-localstorage/145259/1 "2018-10-22T14:19:59Z")

</div>

Hello,  
I am trying to store data gotten from ion-input inside local storage so as to keep the data when i refresh the page and also use it in another page

how can i do this??

 ![image](https://global.discourse-cdn.com/ionicframework/original/3X/1/2/12c73f06f6feda1bd26dea2992b18fa9ac165793.png) If i shud click on the add (fab) button, it takes me to a page to input some my task and description

 ![image](https://global.discourse-cdn.com/ionicframework/original/3X/1/9/19df0fcd9e9732b1d02ffd528393c650a7ccb56c.png) I have typed in my task description. when i click save task, it passes the task to the mainpage and display the description.

Uploading… . but if i should refresh the mainpage, the information will be lost.

so how can i save it in a local storage

---

<div class="post-metadata">

**Author:** ![rapropos](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/rapropos/32/100227_2.png) [@rapropos](https://forum.ionicframework.com/u/rapropos)\
**Post date:** [October 22, 2018, 5:57pm UTC](https://forum.ionicframework.com/t/save-data-gotten-form-ion-input-using-localstorage/145259/2 "2018-10-22T17:57:02Z")

</div>

A better pattern for in-app communication is to make a mutually injected service provider. Storage should only be used to communicate between runs of the app (or pause/resume), otherwise you end up with a host of subtle nasty race conditions.

---

<div class="post-metadata">

**Author:** ![beardedprince](https://avatars.discourse-cdn.com/v4/letter/b/e274bd/32.png) [@beardedprince](https://forum.ionicframework.com/u/beardedprince)\
**Post date:** [October 29, 2018, 1:25pm UTC](https://forum.ionicframework.com/t/save-data-gotten-form-ion-input-using-localstorage/145259/3 "2018-10-29T13:25:08Z")

</div>

Solved  
I later found a way to solve thuis. Thanks

---

<div class="post-metadata">

**Author:** ![mhartington](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/mhartington/32/137757_2.png) [@mhartington](https://forum.ionicframework.com/u/mhartington)\
**Post date:** [July 19, 2021, 9:12pm UTC](https://forum.ionicframework.com/t/save-data-gotten-form-ion-input-using-localstorage/145259/4 "2021-07-19T21:12:29Z")

</div>

Closed on July 19, 2021, 9:12pm UTC


