Eric,

If I understand how $templateCache works, you could decorate $http to not 
use the cache for partials.

Does this gist <https://gist.github.com/boneskull/a8ca70cc44ca5422578c> 
work?  

Chris

On Wednesday, July 23, 2014 7:48:44 PM UTC-7, Eric Eslinger wrote:
>
> Hey all. Here's the issue: in my route and and directive modules, I have a 
> lot of code that looks like:
>
> templateUrl: 'foo/bar/templ.html'
>
> The problem is when I push this to a real server, the templates get cached 
> (as far as I can tell). So, what I want to do is something similar to how I 
> deal with cache-busting my javascript files. However, all my JS loads are 
> in one place (index.html), whereas those templates are in a ton of files 
> all over the place and it's easy to miss one.
>
> What I"m doing in the meantime is just injecting a constant called 
> cacheVer and loading:
>
> templateUrl: "foo/bar/templ.html?v=#{cacheVer.ver}" (coffeescript string 
> interpolation).
>
> Ideally, I could skip that (to clean the code, avoid potential errors, 
> make more compatible stuff, and avoid injecting one component everywhere), 
> and just register some kind of interceptor on maybe $httpProvider that 
> appends the ?v= thingy on each and every request that's for an html file.
>
> Has anyone done this? 
>
> Eric
>

-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to