Cookies concent notice

This site uses cookies from Google to deliver its services and to analyze traffic.
Learn more
Skip to main content
This site is no longer updated.Head to Angular.devHome
/

This is the archived documentation for Angular v17. Please visit angular.dev to see this page for the current version of Angular.

UrlSegmentGroup

Represents the parsed URL segment group.

See more...

      
      class UrlSegmentGroup {
  constructor(segments: UrlSegment[], children: { [key: string]: UrlSegmentGroup; })
  parent: UrlSegmentGroup | null
  segments: UrlSegment[]
  children: {...}
  numberOfChildren: number
hasChildren(): boolean
toString(): string }

Description

See UrlTree for more information.

Constructor

      
      constructor(segments: UrlSegment[], children: { [key: string]: UrlSegmentGroup; })
    
Parameters
segments UrlSegment[]

The URL segments of this group. See UrlSegment for more information

children object

The list of children of this group

Properties

Property Description
parent: UrlSegmentGroup | null

The parent node in the url tree

segments: UrlSegment[] Declared in Constructor

The URL segments of this group. See UrlSegment for more information

children: { [key: string]: UrlSegmentGroup; } Declared in Constructor

The list of children of this group

numberOfChildren: number Read-Only

Number of child segments

Methods

Whether the segment has child segments

      
      hasChildren(): boolean
    
Parameters

There are no parameters.

Returns

boolean

      
      toString(): string
    
Parameters

There are no parameters.

Returns

string