MCPcopy Create free account
hub / github.com/ReactiveX/rxjs / go

Method go

apps/rxjs.dev/src/app/shared/location.service.ts:39–50  ·  view source on GitHub ↗
(url: string|null|undefined)

Source from the content-addressed store, hash-verified

37
38 // TODO: ignore if url-without-hash-or-search matches current location?
39 go(url: string|null|undefined) {
40 if (!url) { return; }
41 url = this.stripSlashes(url);
42 if (/^http/.test(url) || this.swUpdateActivated) {
43 // Has http protocol so leave the site
44 // (or do a "full page navigation" if a ServiceWorker update has been activated)
45 this.goExternal(url);
46 } else {
47 this.location.go(url);
48 this.urlSubject.next(url);
49 }
50 }
51
52 goExternal(url: string) {
53 window.location.assign(url);

Calls 4

stripSlashesMethod · 0.95
goExternalMethod · 0.95
testMethod · 0.80
nextMethod · 0.65

Tested by

no test coverage detected