diff --git a/src/Umbraco.Web.UI.Client/src/init.js b/src/Umbraco.Web.UI.Client/src/init.js index 57df26b532..974cfe97ee 100644 --- a/src/Umbraco.Web.UI.Client/src/init.js +++ b/src/Umbraco.Web.UI.Client/src/init.js @@ -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();