Information:
I have created an Angular (version >= 2) application using
@angular/cli.This application is undergoing version changes.
I do keep the semantic version information of my application updated inside my
package.jsonfile using the commandnpm version majorornpm version minorornpm version patch.I was unable to find this version information inside any files on the "dist" output folder when I run
ng buildorng build --prod.
Question:
Is there a way to bring my application's version information automatically from the package.json file into one of the output files (perhaps inside an html file or a js file)?
Sample from my package.json file:
{
"name": "angular-ui",
"version": "17.6.27",
"description": "My awesome UI application",
"license": "MIT",
...
}
Ideally, I would want to create an "about" component where I would like to publish my application's version information when I visit a URL similar to:
Expected Output on the page:
Application version: v17.6.27