Javascript $route.reload()在IE中不起作用
我正在使用AngularJs构建应用程序。在IE中,即使调用Javascript $route.reload()在IE中不起作用,javascript,angularjs,angular-routing,angularjs-ng-route,Javascript,Angularjs,Angular Routing,Angularjs Ng Route,我正在使用AngularJs构建应用程序。在IE中,即使调用$route.reload(),数据也不会被刷新。但它在其他浏览器中运行良好。即使我测试了不同的系统,我仍然面临同样的问题 这是密码 Service.methodname(data1) .success(function (data, status, header, config) { $scope.response = data; $('#mySchedulElection').modal('h
$route.reload()
,数据也不会被刷新。但它在其他浏览器中运行良好。即使我测试了不同的系统,我仍然面临同样的问题
这是密码
Service.methodname(data1)
.success(function (data, status, header, config) {
$scope.response = data;
$('#mySchedulElection').modal('hide');
if (data == 1) {
$scope.showmessage('Election successfully saved', $scope.MessageType.success);
$route.reload();
}
}
});
提前感谢。检查服务中的缓存策略。默认情况下,AngularJs将缓存您的请求。 试用
$http.get('url', {cache: false});
为该请求创建缓存对象以更好地控制缓存行为可能是一个更好的主意
$http.get('url', {cache: serviceCache});
然后,您可以在需要时使缓存无效:
serviceCache.removeAll();
看
有关详细信息,请尝试$location.refresh();对象不支持属性或方法“刷新”-获取此错误。我已经注入了$locationservice@ArunKumarM您必须在controller/module/factory/directive中声明“$location变量,然后将其用作$location.refresh();