2015-07-27 22:12:30 -07:00
p.location-badge.
exported from <a href='../router'>angular2/router</a>
2015-09-01 13:55:47 -07:00
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.36/modules/angular2/src/router/router_outlet.ts#L15-L149">angular2/src/router/router_outlet.ts (line 15)</a>
2015-07-27 22:12:30 -07:00
:markdown
2015-09-01 13:55:47 -07:00
Maps application URLs into application states, to support deep-linking and navigation.
2015-07-28 13:28:47 -07:00
.l-main-section
h2 Annotations
.l-sub-section
h3.annotation Directive
pre.prettyprint
code.
@Directive({selector: 'router-outlet'})
2015-07-27 22:12:30 -07:00
.l-main-section
h2 Members
.l-sub-section
h3 constructor
pre.prettyprint
code.
constructor(_elementRef: ElementRef, _loader: DynamicComponentLoader, _parentRouter:Router, nameAttr: string)
:markdown
.l-sub-section
2015-09-01 13:55:47 -07:00
h3 name
2015-07-27 22:12:30 -07:00
:markdown
2015-08-11 17:09:57 -07:00
.l-sub-section
2015-09-01 13:55:47 -07:00
h3 activate
2015-08-11 17:09:57 -07:00
2015-09-01 13:55:47 -07:00
pre.prettyprint
code.
activate(nextInstruction: ComponentInstruction)
2015-08-11 17:09:57 -07:00
:markdown
2015-09-01 13:55:47 -07:00
Called by the Router to instantiate a new component during the commit phase of a navigation.
This method in turn is responsible for calling the `onActivate` hook of its child.
2015-08-11 17:09:57 -07:00
2015-07-27 22:12:30 -07:00
.l-sub-section
2015-09-01 13:55:47 -07:00
h3 reuse
2015-07-27 22:12:30 -07:00
pre.prettyprint
code.
2015-09-01 13:55:47 -07:00
reuse(nextInstruction: ComponentInstruction)
2015-07-27 22:12:30 -07:00
:markdown
2015-09-01 13:55:47 -07:00
Called by the <a href='Router-class.html'><code>Router</code></a> during the commit phase of a navigation when an outlet
reuses a component between different routes.
This method in turn is responsible for calling the `onReuse` hook of its child.
2015-07-27 22:12:30 -07:00
.l-sub-section
2015-09-01 13:55:47 -07:00
h3 deactivate
2015-07-27 22:12:30 -07:00
pre.prettyprint
code.
2015-09-01 13:55:47 -07:00
deactivate(nextInstruction: ComponentInstruction)
2015-07-27 22:12:30 -07:00
:markdown
2015-09-01 13:55:47 -07:00
Called by the <a href='Router-class.html'><code>Router</code></a> when an outlet reuses a component across navigations.
This method in turn is responsible for calling the `onReuse` hook of its child.
2015-07-27 22:12:30 -07:00
.l-sub-section
2015-09-01 13:55:47 -07:00
h3 canDeactivate
2015-07-27 22:12:30 -07:00
pre.prettyprint
code.
2015-09-01 13:55:47 -07:00
canDeactivate(nextInstruction: ComponentInstruction)
2015-07-27 22:12:30 -07:00
:markdown
2015-09-01 13:55:47 -07:00
Called by the <a href='Router-class.html'><code>Router</code></a> during recognition phase of a navigation.
If this resolves to `false`, the given navigation is cancelled.
This method delegates to the child component's `canDeactivate` hook if it exists,
and otherwise resolves to true.
2015-07-27 22:12:30 -07:00
.l-sub-section
2015-09-01 13:55:47 -07:00
h3 canReuse
2015-07-27 22:12:30 -07:00
pre.prettyprint
code.
2015-09-01 13:55:47 -07:00
canReuse(nextInstruction: ComponentInstruction)
2015-07-27 22:12:30 -07:00
:markdown
2015-09-01 13:55:47 -07:00
Called by the <a href='Router-class.html'><code>Router</code></a> during recognition phase of a navigation.
If the new child component has a different Type than the existing child component,
this will resolve to `false`. You can't reuse an old component when the new component
is of a different Type.
Otherwise, this method delegates to the child component's `canReuse` hook if it exists,
or resolves to true if the hook is not present.
2015-07-27 22:12:30 -07:00