This blog intends to deal and simplify routing in Angular 4 applications in both development and production environment. While working on routing in Angular 4 applications, we often face some of the following challenges:
- Finding a solution to the problem of cross-origin issues in Angular development environment
- Separating routing configurations and APIs servers URLs from the code, making the application more robust and maintainable
- Finding a generic solution where frequent changing of API URLs (due to deployment on different servers, let’s say for the purpose of load balancing) do not force you to modify and change the code
- Servers where the APIs deployed do not appear in your code at all