From ddd11ff79b61af070a5898e8ce1ac916c45ca05e Mon Sep 17 00:00:00 2001 From: nelsonlaquet Date: Sun, 1 Sep 2013 15:23:14 -0500 Subject: [PATCH] added template cache buster --- public/scripts/app/app.coffee | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/public/scripts/app/app.coffee b/public/scripts/app/app.coffee index a66de181..5ad82256 100644 --- a/public/scripts/app/app.coffee +++ b/public/scripts/app/app.coffee @@ -9,8 +9,16 @@ module.run [ ] module.config [ - '$locationProvider', '$stateProvider', '$dialogProvider', 'AngularyticsProvider' - (location, state, $dialogProvider, analytics) -> + '$locationProvider', '$stateProvider', '$dialogProvider', 'AngularyticsProvider', '$httpProvider' + (location, state, $dialogProvider, analytics, $httpProvider) -> + + $httpProvider.interceptors.push [ + -> + request: (config) -> + return config if !(/^\/?templates\//.test config.url) + config.url += '?' + Math.ceil(Math.random() * 1000000) + return config + ] analytics.setEventHandlers ['Google']