MCPcopy Index your code
hub / github.com/ionic-team/ionic-framework / setSegments

Method setSegments

core/src/components/router/router.tsx:387–393  ·  view source on GitHub ↗
(segments: string[], direction: RouterDirection, queryString?: string, fragment?: string)

Source from the content-addressed store, hash-verified

385 }
386
387 private setSegments(segments: string[], direction: RouterDirection, queryString?: string, fragment?: string) {
388 this.state++;
389 // Every URL write invalidates any in-flight fragment scroll: a newer nav
390 // (with or without a fragment, successful or not) should always supersede.
391 this.fragmentScrollToken++;
392 writeSegments(window.history, this.root, this.useHash, segments, direction, this.state, queryString, fragment);
393 }
394
395 private getSegments(): string[] | null {
396 return readSegments(window.location, this.root, this.useHash);

Callers 4

componentWillLoadMethod · 0.95
pushMethod · 0.95
navChangedMethod · 0.95
writeNavStateRootMethod · 0.95

Calls 1

writeSegmentsFunction · 0.90

Tested by

no test coverage detected