Addss template clearing when in debugmode

(cherry picked from commit 7d2f6c13c3)
This commit is contained in:
perploug
2014-01-24 17:20:34 +01:00
parent 73173f92d6
commit 17838e044c

View File

@@ -47,6 +47,15 @@ app.run(['userService', '$log', '$rootScope', '$location', 'navigationService',
$location.path(rejection.path).search(rejection.search);
});
/** For debug mode, always clear template cache to cut down on
dev frustration and chrome cache on templates */
if(Umbraco.Sys.ServerVariables.isDebuggingEnabled){
$rootScope.$on('$viewContentLoaded', function() {
$templateCache.removeAll();
});
}
/* this will initialize the navigation service once the application has started */
navigationService.init();