You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried to use your solution. But a problem / question showed up: how you import the environment constant in your files? I search your repository and you use this:
import { environment } from '../../../environments/environment';
But in the post you said to change environment.ts to enviroment.dev.ts. The script set-env.ts configure this creating a copy of current environment.__NAME__.ts?
Thanks in advance!
The text was updated successfully, but these errors were encountered:
how do you detect which environment.NAME.ts you should import?
Angular CLI does it, depending on the configuration parameter you run when building (ng build --configuration=production for instance ; in such a case Angular CLI will use environments/environment.prod.ts)
By default development is assumed, which implies no suffix.
how you import the environment constant in your files?
This is the work of set-env.ts, which overwrites the relevant environments/environmentXxx.ts file which the OS env variables inserted inside thanks to the dotenv node lib.
I just read your post on Medium. Great post!
I tried to use your solution. But a problem / question showed up: how you import the environment constant in your files? I search your repository and you use this:
But in the post you said to change
environment.ts
toenviroment.dev.ts
. The scriptset-env.ts
configure this creating a copy of currentenvironment.__NAME__.ts
?Thanks in advance!
The text was updated successfully, but these errors were encountered: