Upgrading Angular to 1.3.8 and adding a fix#16
Upgrading Angular to 1.3.8 and adding a fix#16saravmajestic wants to merge 2 commits intosaymedia:masterfrom
Conversation
Fixing trailing slash issue - when navigating from home to any city (ex: boston) and reload the page, somehow '\' is added to the end of location.href, which breaks the routing. This code will remove the trailing slash Taken from angular-ui/ui-router#50 (comment)
Adding "base" tag since it is mandatory for angular 1.3.x versions
|
Hello! Thanks for this change and sorry for taking so long to get back to you. I've merged the second of your commits already. I have some questions about the trailing slash issue, though: In the stock angular The intended behavior is that AngularJS-server would respect the redirection routes so that the server behaves the same way as the client would: emitting a redirect to the normalized URL. It looks like this isn't working quite right in the demo. If you access this URL then you get a blank page, rather than the redirection that was expected: However, I think the fix here is not to ignore the trailing slash but rather to consider the trailing slash and handle the redirect route so that the browser ends up at this URL: Would you agree that this seems sensible? |
|
Hi, Thanks. |
|
I think there should be only one redirection: |
|
if it is so, your idea should be the correct way to implement! |
#1 - upgraded to angular 1.3.8 version
#2 - tested with express version 4.10.7
#3 - Added a fix for trailing slash during page reload