Issue
I used the following pugin: cordova-plugin-app-version, to get the version of my app and displayed it into my html file.
But I did the migration to Capacitor and cannot find the way to do that with it.
Does somebody find a solution ?
Solution
You can easily import it in your .ts file.
import p from '[path to your file]/package.json';
Then you have access to all the properties in your package.json:
version = p.version;
Then you can display it in your HTML:
<div>{{version}}</div>
Answered By - Dominik R.
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.