RouterOutlet class

Reserves a location in the DOM as an outlet for the AngularDart Router.

A router outlet renders part of the current route in a hierarchical fashion; that is, multiple router outlets may be embedded inside of each-other, with each outlet responsible for rendering a part of the URL:

<!-- Imagine "/users/bob" is being rendered -->

<template router-outlet>
  <!-- view of "UsersShellComponent" -->
  <template router-outlet>
    <!-- view of "UserViewComponent" -->
  </template>
</template>
Annotations
  • @Directive(selector: 'router-outlet')

Constructors

RouterOutlet(@Optional() RouterOutletToken? token, ViewContainerRef _viewContainerRef, Router _router, @Optional() RouterHook? _routerHook)

Properties

hashCode int
The hash code for this object.
no setterinherited
routes List<RouteDefinition>
Route definitions registered with this outlet.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

activate(ComponentFactory<Object> componentFactory, RouterState? oldState, RouterState newState) Future<void>
Activates and renders the component created by componentFactory.
ngOnDestroy() → void
Executed before the directive is removed from the DOM and destroyed.
ngOnInit() → void
Executed after the first change detection run for a directive.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
prepare(ComponentFactory<Object> componentFactory) → ComponentRef<Object>
Returns the component created by componentFactory, prepared for routing.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited