MCPcopy Create free account
hub / github.com/ionic-team/ionic-framework / getFragment

Method getFragment

core/src/components/router/router.tsx:399–404  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

397 }
398
399 private getFragment(): string | undefined {
400 // In hash mode the URL fragment trails a second `#` (e.g. `#/path#anchor`);
401 // parse the routing portion to extract it.
402 const raw = this.useHash ? parsePath(window.location.hash.slice(1)).fragment : window.location.hash.slice(1);
403 return raw ? raw : undefined;
404 }
405
406 /**
407 * Fires a best-effort scroll to the current URL fragment. The scroll bails

Callers 2

navChangedMethod · 0.95
maybeScrollToFragmentMethod · 0.95

Calls 1

parsePathFunction · 0.90

Tested by

no test coverage detected