Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Excerpt from processSegmentAgainstUrl from Angular's Router module
const result: MatchResult = match(rawSegment, route, segments);
consumedSegments = result.consumedSegments;
rawSlicedSegments = segments.slice(result.lastChild);
snapshot = new ActivatedRouteSnapshot(
consumedSegments, result.parameters, Object.freeze({...this.urlTree.queryParams}),
this.urlTree.fragment !, getData(route), outlet, route.component !, route,
getPathIndexShift(rawSegment) + consumedSegments.length, getResolve(route));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment