Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/369.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/angularjs/24.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript $route.reload()在IE中不起作用_Javascript_Angularjs_Angular Routing_Angularjs Ng Route - Fatal编程技术网

Javascript $route.reload()在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

我正在使用AngularJs构建应用程序。在IE中,即使调用
$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();