Issue with URL in HTML 5 mode
I have followed the instructions at
https://jhipster.github.io/tips/010_tip_configuring_html_5_mode.html
to enable HTML 5 mode. It works perfectly for the URLs like this..
AngularJS forward controller takes of redirecting when I hit this URL in browser directly. It doesn't work for the URLs like this.
localhost:8080/admin/path1
localhost:8080/admin/path2
Using Latest 3.12.0.
Mac OS X / Latest Chrome.
My Bad. This was simple REGEX configuration. I changed AngularJS Forwarder request mapping to following and it worked.
@RequestMapping(value = {"/{[path:[^\.]}", "//{[path:[^\.]*}"})
@parmarsanjay Thanks for the fix. Just a heads up that your solution works for /admin/path but not /admin/path/path2. I tested @RequestMapping(value = "/**/{[path:[^\\.]*}") and it works for any number of / https://github.com/jhipster/jhipster.github.io/pull/362
Great. Thanks @ruddell. This worked.
Any idea what needs to happen on Gulp Serve side? It works when I launch the gulp serve. After this if i change my files, files don't load in browser. It say "Cannot GET".
Does it work without gulp serve, if you go directly to localhost:8080? Might be an issue with the gulp proxy configuration
@jdubois Yes. It works fine with localhost:8080. It seems to be an issue with gulp proxy / browsersync config.
OK, so there is something that needs to be updated here in the tip.
And this will need to be also updated for our soon-to-be-released Angular2 version, as there is no Gulp anymore :-)
Any update here? I'll be happy to update our config, but without any news I'm closing this, as this on our soon-to-be legacy 3 release, and we'll see how it goes with Webpack. Anyway, this isn't supported by default, so it's not really a bug.
Most helpful comment
@parmarsanjay Thanks for the fix. Just a heads up that your solution works for /admin/path but not /admin/path/path2. I tested
@RequestMapping(value = "/**/{[path:[^\\.]*}")and it works for any number of/https://github.com/jhipster/jhipster.github.io/pull/362