1
你好,我有一个小的问题: 你在AngularJS的ui-router中加载视图后如何清除缓存。 请帮我AngularJS:如何在ui-router中加载视图后清除缓存?
你好,我有一个小的问题: 你在AngularJS的ui-router中加载视图后如何清除缓存。 请帮我AngularJS:如何在ui-router中加载视图后清除缓存?
试试这个,
app.run(function($rootScope, $templateCache) {
$rootScope.$on('$routeChangeStart', function(event, next, current) {
if (typeof(current) !== 'undefined'){
$templateCache.remove(current.templateUrl);
}
});
});
感谢答复,我有一个喷气问题如何加载后重新加载当前视图它 – Kaker