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

Function decodePath

test/angular/1.6/angular.js:13778–13791  ·  view source on GitHub ↗
(path, html5Mode)

Source from the content-addressed store, hash-verified

13776}
13777
13778function decodePath(path, html5Mode) {
13779 var segments = path.split('/'),
13780 i = segments.length;
13781
13782 while (i--) {
13783 segments[i] = decodeURIComponent(segments[i]);
13784 if (html5Mode) {
13785 // encode forward slashes to prevent them from being mistaken for path separators
13786 segments[i] = segments[i].replace(/\//g, '%2F');
13787 }
13788 }
13789
13790 return segments.join('/');
13791}
13792
13793function parseAbsoluteUrl(absoluteUrl, locationObj) {
13794 var parsedUrl = urlResolve(absoluteUrl);

Callers 1

parseAppUrlFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected