angular/angular.js — pull request #8924 by samuelharden (2014-09-04 09:57:20+00:00)
Title: fix($location): path to work with full url

Changed the way $location.path is handled. Now path function will check if the path contain the base url (protocol://host) is this is there in the path. Mostly user has passed the full url instead of path.
We process it differently, by calling the parse method of the respective location object. Since parse method takes care if the url is HTML5 mode , HTML5 hashbang mode or non HTML5 urls and parses them respectively.

Currently i have made directly used the parse function which updates the whole location object. We can also ass a parsePath method to each of LocationHashbangInHtml5Url,LocationHashbangUrl, LocationHtml5Url classes which will copy implementation from parse method and get the path out of newUrl but won't update the location object. If this implementation have some issue i can work on making this change.

Closes #8617