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.