I'm having an issue using angular html5 mode for routing with a spring boot backend. The application works fine when I use ui router's $state.go() to navigate to different url's, but when I attempt to enter a different state's url and go directly to it, it fails to load properly.
We used a solution similar to what is detailed here (https://spring.io/guides/tutorials/spring-security-and-angular-js/), essentially using a spring controller to forward certain pages to the base url, "/". The difference with ours is that we use a base url, 'step', to put before every page but the home page. When we do navigate directly to a different page in our site, however, every resource that is loaded is turned into our index.html file (js, css, etc.). When we look at the network requests, it's appended the 'step' url in front of every request for some reason (so instead of css/style.css, it would be step/css/style.css).
Here's an example of our spring controller:
@Controller
public class ViewController {
@RequestMapping(value="/step/**")
public String forward() {
return "forward:/";
}
}
Any help would be appreciated, but keep in mind we have looked into various solutions already such as the link mentioned and several others which have similar solutions.