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

Function emptyPathMatch

packages/router/src/utils/config_matching.ts:213–223  ·  view source on GitHub ↗
(
  segmentGroup: UrlSegmentGroup,
  slicedSegments: UrlSegment[],
  r: Route,
)

Source from the content-addressed store, hash-verified

211}
212
213export function emptyPathMatch(
214 segmentGroup: UrlSegmentGroup,
215 slicedSegments: UrlSegment[],
216 r: Route,
217): boolean {
218 if ((segmentGroup.hasChildren() || slicedSegments.length > 0) && r.pathMatch === 'full') {
219 return false;
220 }
221
222 return r.path === '';
223}
224
225export function noLeftoversInUrl(
226 segmentGroup: UrlSegmentGroup,

Calls 1

hasChildrenMethod · 0.45

Tested by

no test coverage detected