How do I display the app version in angular application? the version should be taken from package.json file
package.json
{ \"name\": \"angular-app\", \"v
Using the tsconfig option --resolveJsonModule you can import json files in Typescript.
--resolveJsonModule
In the environment.ts file:
import { version } from '../../package.json'; export const environment = { VERSION: version, };
You can now use environment.VERSION in your application.
environment.VERSION