feat($location): allow automatic rewriting of links to be disabled

Currently, when the location provider is set to html5 mode, all links
on the page are hijacked and automatically rewritten. While this may be
desirable behavior in some cases (such as using ngRoute), not all cases
where html5 mode are enabled imply the desire for this behavior.

One example would be an application using the
[ui-router](https://github.com/angular-ui/ui-router) library, with some
pages that exist outside of angular. Links that are meant to go through
the router use the `ui-sref` directive, so the rewrite behavior is
unnecessary.

Closes #5487
Accidental typo. Would you mind sending a pr to fix it?
On Oct 8, 2014 3:47 PM, "Georgios Kalpakas" <notifications@github.com>
wrote:

> In src/ng/location.js:
>
> > -          mode.enabled :
> > -          html5Mode.enabled;
> > -      html5Mode.requireBase = isBoolean(mode.requireBase) ?
> > -          mode.requireBase :
> > -          html5Mode.requireBase;
> > +
> > +      if (isBoolean(mode.enabled)) {
> > +        html5Mode.enabled =  mode.enabled;
> > +      }
> > +
> > +      if (isBoolean(mode.requireBase)) {
> > +        html5Mode.requireBase = mode.requireBase;
> > +      }
> > +
> > +      if (isBoolean(mode.rewriteLinks)) {
> > +        html5Mode.rewriteLinks =  mode.rewriteLinks;
>
> Same as above.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/angular/angular.js/pull/9487/files#r18617846>.
>