added template cache buster

This commit is contained in:
nelsonlaquet 2013-09-01 15:23:14 -05:00
parent 37bf25293d
commit ddd11ff79b

View file

@ -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']