Uh oh!
There was an error while loading. Please reload this page.
forked from angular/angular.js
- Notifications
You must be signed in to change notification settings - Fork 10
Cachebusting
ProLoser edited this page Mar 28, 2013
·
1 revision
Want to cachebust those ng-include and templateUrl assets? Check out this solution:
myAppModule.config(['$routeProvider','$provide',function($routeProvider,$provide){$provide.decorator('$http',['$delegate',function($delegate){varget=$delegate.get;$delegate.get=function(url,config){url+=(url.indexOf('?')!==-1) ? '?' : '&';url+='v='+cacheBustVersion;returnget(url,config);};return$delegate;}]);