Ionic 2 Cordova and Typescript (App Preferences plugin)

空扰寡人 提交于 2019-12-11 02:25:26

问题


I am working on Ionic 2 application with Typescript. For setting up preferences I wish to use the cordova plugin https://github.com/chrisekelley/AppPreferences/.

There are a few things I am strugling with. After a lot of googling there are a few things that I am not yet able to figure out. It would be great If anyone can help.

  1. Using the above Cordova Plugin with Ionic 2. There are a few posts on the internet which got me to where I am currently. But most of them refer to javascript so dont help completely. How do I use and access the plugin methods in typescript as this is not an ionic-native plugin?

  2. Secondly, I understand on IOS a plist file will be generated which can be modified from Application Settings in IOS as a means to update settings. How and where can I have a similar page/functionality on android?


回答1:


I would recommend that you instead use SqlStorage to persist data like preferences, as it is directly supported by ionic. If you do so, you need to install the sqlite plugin ionic plugin add cordova-sqlite-storage



来源:https://stackoverflow.com/questions/37640077/ionic-2-cordova-and-typescript-app-preferences-plugin

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!