从 Ionic2 中的 config.xml 在屏幕上显示版本 [英] Display version on screen from config.xml in Ionic2

查看:13
本文介绍了从 Ionic2 中的 config.xml 在屏幕上显示版本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在开发一个应用程序,它有一个名为关于我们"的屏幕,我们希望在其中显示应用程序的版本号,该版本号与 config.xml 文件中的相同.

We are developing an app which has a screen named "About Us" where we want to display the app's version number which is same as in config.xml file.

<widget id="com.myApp.MyAppName" version="2.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">

有没有办法将版本号从提到的 xml 文件复制到我屏幕的 ts 文件,反之亦然?

Is there any way to copy the version no from the mentioned xml file to my screen's ts file or vice-versa?

推荐答案

看看这个插件:http://ionicframework.com/docs/native/app-version/

Github 链接:https://github.com/whiteoctober/cordova-plugin-app-版本

如果这对你有用,请告诉我.如果需要,可以提供具体帮助.

Let me know if this work out for you. Can help with specifics if needed.

这篇关于从 Ionic2 中的 config.xml 在屏幕上显示版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆