MCPcopy Index your code
hub / github.com/angular-ui/ui-router / encodePath

Function encodePath

test/angular/1.7/angular.js:14386–14396  ·  view source on GitHub ↗

* Encode path using encodeUriSegment, ignoring forward slashes * * @param {string} path Path to encode * @returns {string}

(path)

Source from the content-addressed store, hash-verified

14384 * @returns {string}
14385 */
14386function encodePath(path) {
14387 var segments = path.split('/'),
14388 i = segments.length;
14389
14390 while (i--) {
14391 // decode forward slashes to prevent them from being double encoded
14392 segments[i] = encodeUriSegment(segments[i].replace(/%2F/g, '/'));
14393 }
14394
14395 return segments.join('/');
14396}
14397
14398function decodePath(path, html5Mode) {
14399 var segments = path.split('/'),

Callers 1

normalizePathFunction · 0.70

Calls 1

encodeUriSegmentFunction · 0.70

Tested by

no test coverage detected