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 ?
CodePudding user response:
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>