In my Angular4 application i ejected the webpack config and used dotenv module to read from a .env file and use those config variables in the application. Since i updated to Angular6 the "ng eject" is depricated and i am using angular-cli. I am looking for a workaroud for this problem (either using a config file or system environment variables).
If i can make a reference in Spring Framework in the application.properties file
spring.datasource.username = ${MYSQL_DB_USERNAME}
MYSQL_DB_USERNAME is environment variable. I would like to use this behavior in environment.ts