RouteDirective

Selectors

[route]

Context

interface RouteContext {
    $implicit: ActivatedRoute;
    snapshot: ActivatedRouteSnapshot;
    url: UrlSegment[];
    params: Params;
    queryParams: Params;
    fragment: string;
    data: Data;
    outlet: string;
    component: Type<any> | string;
    routeConfig: Route;
    root: ActivatedRoute;
    parent: ActivatedRoute | null;
    firstChild: ActivatedRoute | null;
    children: ActivatedRoute[];
    pathFromRoot: ActivatedRoute[];
    paramMap: ParamMap;
    queryParamMap: ParamMap;
}

Example

<ng-container *route="let route">
    {{ route }} // is ActivatedRoute instance
</ng-container>
<ng-container *route="let value = FIELD">
    {{ value }} // is ActivatedRoute[FIELD]
</ng-container>

See more

Last updated