我想在每次ng-include
指令请求一个部分时更改url。到目前为止,我能看到的网址,而该事件是这样的:
app.run(function ($rootScope) {
$rootScope.$on('$includeContentRequested', function (event, url) {
console.log(event);
console.log(url);
});
});
现在我需要能够将URL从'templates/incs/includedPartial.html'
改变'templates/incs/includedPartial.html?cache_version=1_1'
,然后包括部分新链接。
显然我这样做是为了防止版本更改时出现缓存问题。这是一个好策略还是有更好的解决方案?在此先感谢您的帮助...