natchiketa / angular-cli-envvars

Example project for my article "Angular CLI and OS Environment Variables"
55 stars 12 forks source link

Value comming as undefined #3

Open rrohitesh opened 6 years ago

rrohitesh commented 6 years ago

Hello Natchiketa,

First of all thanks for this work. I cloned your repo into my local and after doing npm install i tried to play around it . But, the values in the app component for the two variables that is defined in .env files are coming undefiend.

Can you help me with this?

Javarome commented 5 years ago

Did you define the expected variables in your OS env? If so dotenv should have read them as process.env.YOUR_VARIABLE when running set-env.ts.