I've created angular client and spring boot server app by following below links. https://vitalflux.com/spring-boot-angular-app-hello-world-one-deployable-war/ https://blog.jdriven.com/2016/12/angular2-spring-boot-getting-started/
In my angular application, I've defined routes as below:
It works fine when I start angular development server using "ng serve" and hit below url in browser. http://localhost:4200/dashboard
However, when I start spring boot and then hit the below URL in browser, it does not work and throws error. http://localhost:8080/dashboard
My requirement is that when I hit the URL with angular route in browser, I should be able to load the specific angular component. My angular component doesn't need to get any data from rest API from backend and it is simple angular component.
Can someone please suggest how to fix this?
I'm new to spring boot and not sure how to make this working with angular routes. I've tried to follow below links and things are not very clear to me.
Spring Boot Angular application route from spring controller to angular component(view)
Spring Boot with AngularJS html5Mode
Angular routing doesn't work after deploy into a Springboot Application
Springboot/Angular2 - How to handle HTML5 urls?
How to integrate an Angular 4 app with a Spring Boot stack?
https://blog.jdriven.com/2016/10/integrate-angular-spring-boot-gradle/#support-angular-html5-mode
Spring Boot-Angular - Entering Url in Address Bar results in 404