MCPcopy
hub / github.com/angular-ui/ui-router / parseAppUrl

Function parseAppUrl

test/angular/1.3/angular.js:10600–10615  ·  view source on GitHub ↗
(relativeUrl, locationObj)

Source from the content-addressed store, hash-verified

10598
10599
10600function parseAppUrl(relativeUrl, locationObj) {
10601 var prefixed = (relativeUrl.charAt(0) !== '/');
10602 if (prefixed) {
10603 relativeUrl = '/' + relativeUrl;
10604 }
10605 var match = urlResolve(relativeUrl);
10606 locationObj.$$path = decodeURIComponent(prefixed && match.pathname.charAt(0) === '/' ?
10607 match.pathname.substring(1) : match.pathname);
10608 locationObj.$$search = parseKeyValue(match.search);
10609 locationObj.$$hash = decodeURIComponent(match.hash);
10610
10611 // make sure path starts with '/';
10612 if (locationObj.$$path && locationObj.$$path.charAt(0) != '/') {
10613 locationObj.$$path = '/' + locationObj.$$path;
10614 }
10615}
10616
10617
10618/**

Callers 2

LocationHtml5UrlFunction · 0.70
LocationHashbangUrlFunction · 0.70

Calls 2

urlResolveFunction · 0.70
parseKeyValueFunction · 0.70

Tested by

no test coverage detected