Sorry Caitlin, I just don't have the time to take this further.

What I've supplied your team with is simply the patch I used to get things
working for one particular project, I hope it is helpful.

It's just my opinion, but I think whoever originally wrote location.js and
whoever committed the team to supporting legacy browsers for a stable
release, and for that matter whoever decided to backpedal on supporting IE8
(
https://github.com/angular/angular.js/commit/a2acd794b369b9b7775b79dab15f9b1c17395299)
should get together and fix this bug. That is the way we do things around
here - you make a problem you fix the problem.

If the goal is to get location.js into an easy to maintain state. I would
say the best approach is to remove all the clever tricks and workarounds
for resolving urls. Sure, browsers already know how to apply relative and
absolute paths, and every byte counts when you want a quick download, but
the browsers implementation cannot be relied upon in all cases, i.e. legacy
browsers. The dozen or so lines of code to resolve urls are needed for
legacy browsers, so you might as well just use that method all the time.
This will lead to a simpler and easier to maintain implementation. You also
need to consider whether the same bugs exist in 1.3, I expect it does as
1.3 is supposed to support IE9.

Basically, I wouldn't recommend just tidying up and merging my fix.

The disparity between actual and documented browser support, and
back-pedalling on supported browsers for a stable release has convinced me
Angular is not mature enough for real world systems. IE8 still has around
8% of users. It is unlikely I will be using it for future projects. The
real problem is the expectation gap. A expect a lot of people have wasted a
lot of time with Angular as its apparently well known limitations are not
well documented. Not your fault Caitlin I know.

Sorry I cannot be of any help.


On 28 March 2014 12:02, Caitlin Potter <notifications@github.com> wrote:

> In src/ng/location.js:
>
> > +      // The href should be a regular url e.g. /link/somewhere or link/somewhere or ../somewhere or somewhere#anchor or http://example.com/somewhere
> > +      if (LocationMode === LocationHashbangInHtml5Url) {
> > +        // get the actual href attribute - see http://msdn.microsoft.com/en-us/library/ie/dd347148(v=vs.85).aspx
> > +        // TODO check browser is in standards mode
> > +        var href = elm[0].getAttribute('href');
> > +
> > +        if (href.indexOf('://' == -1)) {         // Ignore absolute URLs
> > +          if (href[0] == '/') {
> > +            // absolute path - replace old path
> > +            absHref = serverBase(absHref) + href;
> > +          } else if (href[0] == '#') {
> > +            // local anchor
> > +            absHref = serverBase(absHref) + $location.path() + href
> > +          } else {
> > +            // relative path - join with current path
> > +            var stack = $location.path().split("/"),
>
> I can help you fix failing tests and write new ones for your patch, but we
> do need tests. As for the timeframe this can be merged for, that's hard to
> say --- but having a mergeable patch will help make that soon.
>
> So, I can pair with you on getting this in, but it's going to take some
> extra work.
>
> --
> Reply to this email directly or view it on GitHub<https://github.com/angular/angular.js/pull/6421/files#r11049243>
> .
>