I want to change the url each time a ng-include
directive requests a partial. So far I'm able to see the url and the event like this:
app.run(function ($rootScope) {
$rootScope.$on('$includeContentRequested', function (event, url) {
console.log(event);
console.log(url);
});
});
Now I need to be able to change the url from 'templates/incs/includedPartial.html'
to 'templates/incs/includedPartial.html?cache_version=1_1'
, then include the partial with the new link.
Obviously I'm doing this to prevent caching problems on version change. Is this a good strategy or is there a better solution? Thanks in advance for any help...