Skip to content

Commit 17838e0

Browse files
author
perploug
committed
Addss template clearing when in debugmode
(cherry picked from commit 7d2f6c1)
1 parent 73173f9 commit 17838e0

File tree

1 file changed

+9
-0
lines changed
  • src/Umbraco.Web.UI.Client/src

1 file changed

+9
-0
lines changed

src/Umbraco.Web.UI.Client/src/init.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,15 @@ app.run(['userService', '$log', '$rootScope', '$location', 'navigationService',
4747
$location.path(rejection.path).search(rejection.search);
4848
});
4949

50+
51+
/** For debug mode, always clear template cache to cut down on
52+
dev frustration and chrome cache on templates */
53+
if(Umbraco.Sys.ServerVariables.isDebuggingEnabled){
54+
$rootScope.$on('$viewContentLoaded', function() {
55+
$templateCache.removeAll();
56+
});
57+
}
58+
5059
/* this will initialize the navigation service once the application has started */
5160
navigationService.init();
5261

0 commit comments

Comments
 (0)