Set HTTP Base URLs of Production and Development Environment - Angular 6 / Angular 7
If we are developing angular applicatin then we use development and production enviroment. We use REST API for both development and production enviroment. So we should use HTTP base URL in one place for development and production.
In angular application you can see src/environments folder. It contains two files environment.ts and environment.prod.ts for development and production environment. When we move application development to production then automatically call HTTP base URL.
Set base url in development environment
Set base url in production environment
Import environment into src/app/services/blog.service.ts
You can also replace all server url in following services like above blog.service.ts
Please click below YouTube button for subscribe my channel RSGiTECH for latest videos.
Angular Project Login - username: admin and password: admin
Angular 6/7 Tutorial in Hindi
RSGiTECH provides video tutorial for enough understanding of all the necessary components of Angular 6 and Angular 7.
RSGITECH will keep uploading videos of the latest features of Angular. Please subscribe my channel for latest videos.