(relativeUrl, locationObj)
| 12440 | } |
| 12441 | |
| 12442 | function parseAppUrl(relativeUrl, locationObj) { |
| 12443 | var prefixed = (relativeUrl.charAt(0) !== '/'); |
| 12444 | if (prefixed) { |
| 12445 | relativeUrl = '/' + relativeUrl; |
| 12446 | } |
| 12447 | var match = urlResolve(relativeUrl); |
| 12448 | locationObj.$$path = |
| 12449 | decodeURIComponent(prefixed && match.pathname.charAt(0) === '/' |
| 12450 | ? match.pathname.substring(1) |
| 12451 | : match.pathname); |
| 12452 | locationObj.$$search = parseKeyValue(match.search); |
| 12453 | locationObj.$$hash = decodeURIComponent(match.hash); |
| 12454 | |
| 12455 | // make sure path starts with '/'; |
| 12456 | if (locationObj.$$path && locationObj.$$path.charAt(0) != '/') { |
| 12457 | locationObj.$$path = '/' + locationObj.$$path; |
| 12458 | } |
| 12459 | } |
| 12460 | |
| 12461 | /** |
| 12462 | * |
no test coverage detected