angular - Ionic 3 how to implement application user settings and store them
问题描述
I tried looking for a tutorial on this, but I didn't really find one that was helpful.
I have an Ionic 3 application, and I want to have some user settings for various little small things, that should be accessible from any part of the application (and any part of the code). These settings would also have to be stored on the device, so they should be saved somewhere.
How can I achieve this with Ionic 3? Do I need to have a "provider" for this, and import that provider into all of my pages, and have a 'getSetting' and 'setSetting' that's accessible through this provider?
Or is there a special way to actually handle this?
解决方案
看看离子存储。这样就可以将变量或类似 json 的内容保存到设备的本地存储中。
您不必使用其他提供程序,因为您可以只导入 Ionic Storage 之一。
推荐阅读
- rabbitmq - 一个通道多通道交换或一个通道多通道交换
- javascript - React js - 有没有其他方法来优化我的条件代码
- image-segmentation - 使用自定义数据集注释图像以训练 YOLO
- docusignapi - DocuSign 何时为 Chrome 80 做好准备?- sameSite cookie 更改
- c# - 在迁移中编写更新 sql 脚本
- angular - 如何限制角料垫芯片的字符大小?
- java - Java中的贝塞尔曲线与点
- c# - C# WCF 客户端参数异常 XmlNode[] 无法转换为类型“...”
- ios - 如何在我的 ios 应用程序中检索嵌套的 firebase 数据?
- python - 如何合并 2 个不同长度的数据框并保留第一个数据框的所有位置?