RouterOutlet

Stable Directive

What it does

Acts as a placeholder that Angular dynamically fills based on the current router state.

How to use

<router-outlet></router-outlet>
<router-outlet name='left'></router-outlet>
<router-outlet name='right'></router-outlet>

A router outlet will emit an activate event any time a new component is being instantiated, and a deactivate event when it is being destroyed.

<router-outlet
  (activate)='onActivate($event)'
  (deactivate)='onDeactivate($event)'></router-outlet>

Class Overview

class RouterOutlet {
  constructor(parentOutletMap: RouterOutletMap, location: ViewContainerRef, resolver: ComponentFactoryResolver, name: string)
  
  
  outletMap : RouterOutletMap
  activateEvents : EventEmitter
  deactivateEvents : EventEmitter
  ngOnDestroy() : void
  isActivated : boolean
  component : Object
  activatedRoute : ActivatedRoute
  deactivate() : void
  activate(activatedRoute: ActivatedRoute, loadedResolver: ComponentFactoryResolver, loadedInjector: Injector, providers: ResolvedReflectiveProvider[], outletMap: RouterOutletMap) : void
}

Selectors

router-outlet

Class Description

Constructor

constructor(parentOutletMap: RouterOutletMap, location: ViewContainerRef, resolver: ComponentFactoryResolver, name: string)

Class Details

outletMap : RouterOutletMap
activateEvents : EventEmitter
deactivateEvents : EventEmitter
ngOnDestroy() : void
isActivated : boolean
component : Object
activatedRoute : ActivatedRoute
deactivate() : void
activate(activatedRoute: ActivatedRoute, loadedResolver: ComponentFactoryResolver, loadedInjector: Injector, providers: ResolvedReflectiveProvider[], outletMap: RouterOutletMap) : void

exported from @angular/router/index, defined in @angular/router/src/directives/router_outlet.ts

doc_Angular
2016-10-06 09:46:58
Comments
Leave a Comment

Please login to continue.