Angular 7 universal configuration tutorial - environment variables

preview_player
Показать описание
Environment variables are a fundamental part of developing with Nodejs, allowing your app to behave differently based on the environment you want them to run in. There should be no hard coded url or values within your application which will help you to deploy your app in any environment without changing your code. This angular universal tutorials show how can set and get variables through angular universal ngExpressengine and nodejs. We will be using typescript, angular cli. Its also works with angular 6. Enjoy and speed up your code.

Tutorial files are available in SP2 branch on the below url:

-~-~~-~~~-~~-~-
Please watch: "Angular elements web components with angular 7/6"
-~-~~-~~~-~~-~-
Рекомендации по теме
Комментарии
Автор

Awesome video Kalyan. This one is more compact. Great tips - very useful for ssr setup. 👌 look forward for more videos.

debajyotim
Автор

Awesome work Kalyan. This is short and to the point. Waiting for the next video.

aniruddhakhan
Автор

nice tips. Thank you. I was using environment variable before. const port = process.env.PORT || environment.PORT; like this. but I think .env method is more efficent.

javascript_developer
Автор

Awesome trick Kalyan da. It is very usefull.

debd
Автор

This does not work for prerender. Getting error "No provider for CONFIG"

deba
Автор

Thanks! this video was very helpful. which video is for the next part where variables are accessed in the angular app?

ninahorne
Автор

is there a way to pull .env variables from environemnt.ts file in ANGULAR ?. I'd like something like it:
.env:
IP = localhost
PORT=8000


environemnt.ts:
export const environment = {
production: false,
defaultCompany: "xxx",
basepath: IP;//esta IP seria la del archivo .env
};

camn-bvvq
Автор

Is there a way to pull environmental variables of the host server while running the application?

venkatagandi
Автор

How to read tomcat VM arguments in typescript ?

vsr
Автор

I can't find the file server.ts?? Can someone tell me why??

allenjoseph
Автор

is there a way to pull .env variables from environemnt.ts file in ANGULAR ?. I'd like something like it:
.env:
IP = localhost
PORT=8000


environemnt.ts:
export const environment = {
production: false,
defaultCompany: "xxx",
basepath: IP;//esta IP seria la del archivo .env
};

camn-bvvq
Автор

is there a way to pull .env variables from environemnt.ts file in ANGULAR ?. I'd like something like it:
.env:
IP = localhost
PORT=8000


environemnt.ts:
export const environment = {
production: false,
defaultCompany: "xxx",
basepath: IP;//esta IP seria la del archivo .env
};

camn-bvvq
join shbcf.ru