# $state.go() losing previous data

**URL:** <https://forum.ionicframework.com/t/state-go-losing-previous-data/6838>\
**Category:** ionic-v1\
**Created:** [July 15, 2014, 3:54am UTC](https://forum.ionicframework.com/t/state-go-losing-previous-data/6838 "2014-07-15T03:54:59Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ramose](https://avatars.discourse-cdn.com/v4/letter/r/f9ae1b/32.png) [@ramose](https://forum.ionicframework.com/u/ramose)\
**Post date:** [July 15, 2014, 3:55am UTC](https://forum.ionicframework.com/t/state-go-losing-previous-data/6838/1 "2014-07-15T03:55:00Z")

</div>

Hi all,

I have this case:

I have form in page A. After fill it up, then go to page B.  
tap Back button will back to page A, but all fields in the form are empty.

Is there any ionic view navigation system that allow pages keep in memory?  
Thanks 🙂

---

<div class="post-metadata">

**Author:** ![tumoxep](https://avatars.discourse-cdn.com/v4/letter/t/d2c977/32.png) [@tumoxep](https://forum.ionicframework.com/u/tumoxep)\
**Post date:** [July 15, 2014, 7:57am UTC](https://forum.ionicframework.com/t/state-go-losing-previous-data/6838/2 "2014-07-15T07:57:13Z")

</div>

Store it in $rootScope.

---

<div class="post-metadata">

**Author:** ![Calendee](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/calendee/32/13656_2.png) [@Calendee](https://forum.ionicframework.com/u/Calendee)\
**Post date:** [July 15, 2014, 1:38pm UTC](https://forum.ionicframework.com/t/state-go-losing-previous-data/6838/3 "2014-07-15T13:38:38Z")

</div>

You need to use services for this. Look in the AngularJS services, factories, and providers - they are all (almost) the same thing.

> **[Providers](https://egghead.io/lessons/angularjs-providers)**
>
> This lesson describes what is really happening when you use the angular
> factory and how you can make your factories even more dynamic in creation.
> This gets further into the internals of AngularJS by showing you how a factory is built dynamically for...
