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

routes ↔ List<RouteDefinition>
Route definitions registered with this outlet.
@Input(), read / write
hashCode → int
The hash code for this object. [...]
read-only, inherited
runtimeType → Type
A representation of the runtime type of the object.
read-only, inherited

Methods

activate(ComponentFactory componentFactory, RouterState oldState, RouterState newState) → Future<Null>
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. [...]
prepare(ComponentFactory componentFactory) → ComponentRef
Returns the component created by componentFactory, prepared for routing. [...]
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toString() → String
Returns a string representation of this object.
inherited

Operators

operator ==(dynamic other) → bool
The equality operator. [...]
inherited