I am very much new to angular and spring. I might have made some silly mistakes. I have Angular + Spring app which displays login screen and after that it shows menu. This w
Try to add this in your Spring Boot code:
@Bean
public ErrorViewResolver customErrorViewResolver() {
final ModelAndView redirectToIndexHtml = new ModelAndView("forward:/index.html", Collections.emptyMap(), HttpStatus.OK);
return (request, status, model) -> status == HttpStatus.NOT_FOUND ? redirectToIndexHtml : null;
}
It works for me and even Angular routing is working. I found it here.