如何在Ionic 3(Ionic,Angular 5)上刷新页面 [英] How to refresh a page on Ionic 3 (Ionic, Angular 5)
问题描述
我正在建立收藏夹列表,可以删除页面中的列表项.它基于Ionic sqlite
存储空间.
I’m building a favorite list which I can erase list items within a page. It’s based on Ionic sqlite
storage.
我发现离子页面将保留删除的离子列表项,直到我重新进入列表页面. 因此,在从离子存储设备中删除项目后,需要刷新页面.
I found Ionic page will keep removed ion list items until I re-enter the list page. So it needs refreshing a page upon removing an item from ionic storage.
如何刷新特定页面?
window.location.refresh()
似乎刷新了整个页面……这不是我想要做的.
How can I refresh a particular page?
window.location.refresh()
seems to refresh the entire pages… this is not what I’m trying to do.
我需要在应用程序的二十个页面中刷新一个页面,所以navCtrl.setRoot()
也不起作用.
I need to refresh a single page out of twenty pages on my app so navCtrl.setRoot()
will not work either.
预先感谢
推荐答案
请尝试这个吗?
this.navCtrl.setRoot(this.navCtrl.getActive().component);
这篇关于如何在Ionic 3(Ionic,Angular 5)上刷新页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!