如何解决当我的 url 有参数时,如何使用fancybox 清除缓存?
我在angularjs中使用fancybox
我的.aspx文件
<a class="fancybox fancybox.iframe" fancybox ng-click="openFancybox('url.aspx?TypeGraph=1')">
<span class="conso">test</span>
</a>
<a class="fancybox fancybox.iframe" fancybox ng-click="openFancybox('url.aspx?TypeGraph=2')">
<span class="conso">test2</span>
</a>
我的app.js文件
app.directive('fancybox',function ($compile,$http) {
return {
restrict: 'A',controller: function ($scope) {
$scope.openFancybox = function (url) {
$http.get(url).then(function (response) {
console.log(response)
if (response.status == 200) {
var template = angular.element(response.data);
var compiledTemplate = $compile(template);
compiledTemplate($scope);
//$.fancybox.open();
$.fancybox.open({ content: template,type: 'html' });
}
});
};
}
};
});
但我的问题是当我点击第一个时它运行良好,但当我点击第二个时它会显示我点击的第一个链接。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。