Quantcast
Channel: Ionic Forum - Latest posts
Viewing all articles
Browse latest Browse all 228595

Cached state controller instantiates on some state changes

$
0
0

per default a controller and the connected template is only cached for one back-action to it.

If you go again to this view it is instantiated again.

Like
You are going from View A to B and then to C --> now A, B are cachend
Now you are going back to B --> the cached B is used
In the next step you are going back to A --> the cached one is used

If you are going again to B or C they are reinstantiated.
Because per default "forward views" are not cached.

Another reasin could be that the default count of cached views is set to 10 --> if you reach the limit the oldest cached views are getting wiped and replaced by the new ones.

You can activate forwardCaching and increasing the view cache limit in the $ionicConfigProvider.
http://ionicframework.com/docs/api/provider/$ionicConfigProvider/
views.maxCache(maxNumber)
views.forwardCache(value)


Viewing all articles
Browse latest Browse all 228595

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>