Perry Govier
944a92b08d
feat(templateCache): automatically cache template files to prevent flicker on page navigation and improve performance
State templates are cached automatically, but you can optionally cache other templates.
```js
$ionicTemplateCahce('myNgIncludeTemplate.html');
```
Optionally disable all preemptive caching with the `$ionicConfigProvider` or individual states by setting `prefetchTemplate`
in the $state definition
```js
$ionicTemplateCahce('myNgIncludeTemplate.html');
```js
angular.module('myApp', ['ionic'])
.config(function($stateProvider, $ionicConfigProvider) {
// disable preemptive template caching globally
$ionicConfigProvider.prefetchTemplates(false);
// disable individual states
$stateProvider
.state('tabs', {
url: "/tab",
abstract: true,
prefetchTemplate: false,
templateUrl: "tabs-templates/tabs.html"
})
.state('tabs.home', {
url: "/home",
views: {
'home-tab': {
prefetchTemplate: false,
templateUrl: "tabs-templates/home.html",
controller: 'HomeTabCtrl'
}
}
});
});
```
2014-08-15 15:10:19 -05:00
..
2014-08-15 15:10:19 -05:00
2014-06-02 13:17:30 -05:00
2014-04-14 10:47:27 -06:00
2014-05-12 13:07:58 -05:00
2014-05-12 13:07:58 -05:00
2014-04-14 10:47:27 -06:00
2014-06-02 13:17:30 -05:00
2014-06-02 13:17:30 -05:00
2014-06-02 13:17:30 -05:00
2014-04-17 09:20:17 -05:00
2014-06-02 13:17:30 -05:00
2014-06-02 13:17:30 -05:00
2014-06-02 13:17:30 -05:00
2014-04-14 10:47:27 -06:00
2014-05-12 13:07:58 -05:00
2014-06-02 13:17:30 -05:00
2014-06-12 11:40:23 -05:00
2014-06-02 13:17:30 -05:00
2014-06-02 13:17:30 -05:00
2014-06-02 13:17:30 -05:00
2014-08-06 10:32:40 -06:00
2014-06-27 15:58:17 -05:00
2014-05-12 15:13:44 -05:00
2014-08-13 10:30:44 -06:00
2014-06-11 16:07:38 -06:00
2014-07-08 11:32:43 -06:00
2014-06-02 13:17:30 -05:00
2014-06-02 13:17:30 -05:00
2014-07-07 13:43:12 -06:00
2014-06-12 13:29:01 -05:00
2014-04-14 10:47:27 -06:00
2014-06-02 13:17:30 -05:00
2014-06-11 16:48:53 -05:00
2014-06-02 13:17:30 -05:00
2014-07-31 14:43:29 -05:00
2014-06-27 11:27:06 -05:00
2014-06-02 13:17:30 -05:00
2014-06-02 13:17:30 -05:00
2014-06-02 13:17:30 -05:00
2014-06-02 13:17:30 -05:00
2014-06-02 13:17:30 -05:00
2014-07-07 12:42:51 -06:00
2014-07-07 13:14:58 -06:00
2014-06-02 13:17:30 -05:00
2014-06-18 16:16:44 -05:00
2014-06-02 13:17:30 -05:00
2014-08-15 15:10:19 -05:00
2014-06-02 13:17:30 -05:00
2014-07-09 17:10:43 -05:00
2014-07-02 18:27:07 -05:00
2014-07-10 23:51:55 -06:00
2014-02-21 11:22:23 -05:00
2014-06-23 09:31:27 -05:00