angular/angular.js — pull request #6129 by caitp (2014-02-05 16:22:25+00:00)
Title: fix($location): support alternative means of setting application base path

In HTML, the tag is used to configure how relative hyperlinks are
resolved. In Angular, it has another use, configuring how URLs are rewritten.
Because of this, setting the base URL to some external path outside of the
application would cause $location.$$parse() to throw (which is the desired
behaviour).

This change enables developers to imperatively configure the application
basePath, taking advantage of the natural HTML use of the tag without
breaking Angular applications.

Example:

``` angular.module("test", [])
.config(function($locationProvider) {
$locationProvider.baseHref("http://foo.com/the/base/application/path/");
});
```

Closes #4442