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

Function parseAppUrl

test/angular/1.4/angular.js:11699–11714  ·  view source on GitHub ↗
(relativeUrl, locationObj)

Source from the content-addressed store, hash-verified

11697
11698
11699function parseAppUrl(relativeUrl, locationObj) {
11700 var prefixed = (relativeUrl.charAt(0) !== '/');
11701 if (prefixed) {
11702 relativeUrl = '/' + relativeUrl;
11703 }
11704 var match = urlResolve(relativeUrl);
11705 locationObj.$$path = decodeURIComponent(prefixed && match.pathname.charAt(0) === '/' ?
11706 match.pathname.substring(1) : match.pathname);
11707 locationObj.$$search = parseKeyValue(match.search);
11708 locationObj.$$hash = decodeURIComponent(match.hash);
11709
11710 // make sure path starts with '/';
11711 if (locationObj.$$path && locationObj.$$path.charAt(0) != '/') {
11712 locationObj.$$path = '/' + locationObj.$$path;
11713 }
11714}
11715
11716
11717/**

Callers 2

LocationHtml5UrlFunction · 0.70
LocationHashbangUrlFunction · 0.70

Calls 2

urlResolveFunction · 0.70
parseKeyValueFunction · 0.70

Tested by

no test coverage detected