Not sure how this is supposed to work. To be able to support Angular's development server and Spring as a standalone application I had to hardcode the port Spring uses. The problem is, that Angular runs on port 4200. Angular is compiled to static files. So I cannot dynamically add the port that is configured for Spring. But Angular has to be able to talk to the Spring application. I chose port 17333, because it does not collide with the standard Tomcat port (8080).
Pdb
This project was generated with Angular CLI version 8.3.8.
Development server
Run ng serve for a dev server. Navigate to http://localhost:4200/. The app will automatically reload if you change any of the source files.
Code scaffolding
Run ng generate component component-name to generate a new component. You can also use ng generate directive|pipe|service|class|guard|interface|enum|module.
Build
Run ng build to build the project. The build artifacts will be stored in the dist/ directory. Use the --prod flag for a production build.
Running unit tests
Run ng test to execute the unit tests via Karma.
Running end-to-end tests
Run ng e2e to execute the end-to-end tests via Protractor.
Further help
To get more help on the Angular CLI use ng help or go check out the Angular CLI README.