MCPcopy Create free account
hub / github.com/angular/angular / getServerBase

Method getServerBase

packages/common/upgrade/src/location_shim.ts:347–352  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

345 }
346
347 private getServerBase() {
348 const {protocol, hostname, port} = this.platformLocation;
349 const baseHref = this.locationStrategy.getBaseHref();
350 let url = `${protocol}//${hostname}${port ? ':' + port : ''}${baseHref || '/'}`;
351 return url.endsWith('/') ? url : url + '/';
352 }
353
354 private parseAppUrl(url: string) {
355 if (DOUBLE_SLASH_REGEX.test(url)) {

Callers 5

browserUrlMethod · 0.95
parseAppUrlMethod · 0.95
$$parseMethod · 0.95
$$parseLinkUrlMethod · 0.95
composeUrlsMethod · 0.95

Calls 1

getBaseHrefMethod · 0.45

Tested by

no test coverage detected