Views/Templates cache


#1

Hi,

I read in the Ionic documentation (http://ionicframework.com/docs/api/directive/ionNavView/) that views are being stored in cache by default to improve performance.

Since that behaviour is the default, is it necessary or helpful to use the $templateCache from AngularJS to improve even more the performance?

Thanks.


#2

Hi @guillermo_varela these are different things: views and templates.

Ionic’s view cache stores the view’s dom nodes and the scope exactly as they were when the user decided to navigate somewhere else. Later, when the user goes to that view again, Ionic will retrieve and deliver the very same dom elements and scope state to the user.


#3

Thanks for your explanation :smile: