gpt4 book ai didi

angularjs - 清除 ionic 应用程序中的缓存?

转载 作者:行者123 更新时间:2023-12-02 23:06:22 24 4
gpt4 key购买 nike

我读了很多博客,它说有一个错误

$scope.logout = function() {

$ionicHistory.clearCache();
$ionicHistory.clearHistory();
$state.go('home');

};

有没有使用 ionic 代码或使用一些 Angular 代码清除缓存的解决方案?

最佳答案

使用此插件可以清除缓存

按照此步骤操作

1) 安装此插件 https://www.npmjs.com/package/cordova-plugin-cache

2)将此行写入要清除缓存的位置

window.cache.clear()

关于angularjs - 清除 ionic 应用程序中的缓存?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33519445/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com