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
Angularjs Google Chrome强制重新加载角度用户界面路由器_Angularjs_Google Chrome - Fatal编程技术网

Angularjs Google Chrome强制重新加载角度用户界面路由器

Angularjs Google Chrome强制重新加载角度用户界面路由器,angularjs,google-chrome,Angularjs,Google Chrome,当我更改角度视图html时,我使用Ctrl+shift+r在Google Chrome中强制重新加载,但使用角度ui视图标记时,我的部分仍然使用旧缓存为什么?您在路由定义中尝试过类似:cache:false的东西吗?比如: $stateProvider .state("splash", { url: "/splash", abstract:true, templateUrl:

当我更改角度视图html时,我使用Ctrl+shift+r在Google Chrome中强制重新加载,但使用角度ui视图标记时,我的部分仍然使用旧缓存为什么?

您在路由定义中尝试过类似:cache:false的东西吗?比如:

 $stateProvider
            .state("splash", {
                url: "/splash",
                abstract:true,
                templateUrl: "/app/view/template/splash/splash.html"
            })

            .state("index", {
                cache: true, //<-- THIS FORCE CACHE 
                abstract: true,
                url: "/index",
                templateUrl: "/app/view/template/common/content.html"
            })
$stateProvider
.state(“飞溅”{
url:“/splash”,
摘要:没错,
templateUrl:“/app/view/template/splash/splash.html”
})
.state(“索引”{

cache:true,//我已经尝试过缓存,但不起作用,我将尝试应用程序runTry:打开chrome开发工具的“网络”选项卡,然后选中“禁用缓存”
 app.run([
        "$rootScope", "$templateCache", function($rootScope, $templateCache) {
            $rootScope.$on("$routeChangeStart", function(event, next, current) {

                    if (typeof (current) !== "undefined") {
                        $templateCache.remove(current.templateUrl); //<-- CLEAN CACHE OF ANGULAR OF HTML TEMPLATE

                }

            });
        }
    ]);