angular/angular.js — pull request #3302 by rzschech (2013-07-22 17:56:47+00:00)
Title: Make $urlUtils public and add a resolve callback

The resolve callback allows the application code to modify the
resolved url before it is normailzed by urlParsingNode.href for example:

var parsed = $urlUtils.resolve("foo", function(urlUtils) {
urlUtils.protocol =
urlUtils.protocol === 'https:' ? 'wss:' : 'ws:';
});
parsed.href // wss://localhost/foo

The resolved url object now includes the aditional properties hostname,
port, pathname, hash and search.