GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Docs
  • Tutorials
  • Playground
  • Reference
  • code
  • UrlSegment
  • ParamMap

This view

  • Original page
  • New address

GeezerVison is showing next.angular.dev — UrlSegment • Angular

API

    
      class UrlSegment {}
    
    
@parampathstring

The path part of a URL segment

@paramparameters{ [name: string]: string; }

The matrix parameters associated with a segment

@returnsUrlSegment

The path part of a URL segment

The matrix parameters associated with a segment

Description

Represents a single URL segment.

A UrlSegment is a part of a URL between the two slashes. It contains a path and the matrix parameters associated with the segment.

Usage Notes

 ### Example

@Component({templateUrl:'template.html'})
class MyComponent {
  constructor(router: Router) {
    const tree: UrlTree = router.parseUrl('/team;id=33');
    const g: UrlSegmentGroup = tree.root.children[PRIMARY_OUTLET];
    const s: UrlSegment[] = g.segments;
    s[0].path; // returns 'team'
    s[0].parameters; // returns {id: 33}
  }
}
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.