-
Notifications
You must be signed in to change notification settings - Fork 27.5k
Conversation
Thanks for the PR! Please check the items below to help us merge this faster. See the contributing docs for more information.
If you need to make changes to your pull request, you can update the commit with Thanks again for your help! |
Ping @caitp |
Thanks, I'll look over this in a sec |
var href = elm[0].getAttribute('href'); | ||
|
||
if (href.indexOf('://' == -1)) { // Ignore absolute URLs | ||
if (href[0] == '/') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Even though old IE is not supported, it's probably better to use charAt()
rather than the array index annotation --- and maybe just cache the value so that it doesn't need to be fetched multiple times.
…x them This is temporary
@richardcrichardc I have done some extra work on this at #6899 --- It still needs to be cleaned up a bit more, but this is getting there. |
…x them This is temporary
…x them This CL fixes problems and adds test cases for changes from angular#6421. Changes include fixing the algorithm for preprocessing href attribute values, as well as supporting xlink:href attributes.
…cy browsers This CL fixes problems and adds test cases for changes from #6421. Changes include fixing the algorithm for preprocessing href attribute values, as well as supporting xlink:href attributes. Credit for the original URL parsing algorithm still goes to @richardcrichardc. Good work, champ!
…Mode Previously, LocationHashbangInHtml5Url, which is used when html5Mode is enabled in browsers which do not support the history API (IE8/9), would behave very inconsistently WRT relative URLs always being resolved relative to the app root url. This fix enables these legacy browsers to behave like history enabled browsers, by processing href attributes in order to resolve urls correctly. Closes angular#6162 Closes angular#6421 Closes angular#6899 Closes angular#6832 Closes angular#6834
…cy browsers This CL fixes problems and adds test cases for changes from angular#6421. Changes include fixing the algorithm for preprocessing href attribute values, as well as supporting xlink:href attributes. Credit for the original URL parsing algorithm still goes to @richardcrichardc. Good work, champ!
…Mode Previously, LocationHashbangInHtml5Url, which is used when html5Mode is enabled in browsers which do not support the history API (IE8/9), would behave very inconsistently WRT relative URLs always being resolved relative to the app root url. This fix enables these legacy browsers to behave like history enabled browsers, by processing href attributes in order to resolve urls correctly. Closes #6162 Closes #6421 Closes #6899 Closes #6832 Closes #6834
…cy browsers This CL fixes problems and adds test cases for changes from #6421. Changes include fixing the algorithm for preprocessing href attribute values, as well as supporting xlink:href attributes. Credit for the original URL parsing algorithm still goes to @richardcrichardc. Good work, champ!
See #6162.
As noted in #6162, this fix is not ready to merge.