angular-cn/public/docs/js/latest/api/router/RouterOutlet-class.jade

133 lines
1.8 KiB
Plaintext

p.location-badge.
exported from <a href='../router'>angular2/router</a>
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.34/modules/angular2/src/router/router_outlet.ts#L12-L171">angular2/src/router/router_outlet.ts (line 12)</a>
:markdown
A router outlet is a placeholder that Angular dynamically fills based on the application's route.
## Use
```
<router-outlet></router-outlet>
```
.l-main-section
h2 Annotations
.l-sub-section
h3.annotation Directive
pre.prettyprint
code.
@Directive({selector: &#39;router-outlet&#39;})
.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
h3 childRouter
:markdown
.l-sub-section
h3 name
:markdown
.l-sub-section
h3 commit
pre.prettyprint
code.
commit(instruction: Instruction)
:markdown
Given an instruction, update the contents of this outlet.
.l-sub-section
h3 canDeactivate
pre.prettyprint
code.
canDeactivate(nextInstruction: Instruction)
:markdown
Called by Router during recognition phase
.l-sub-section
h3 canReuse
pre.prettyprint
code.
canReuse(nextInstruction: Instruction)
:markdown
Called by Router during recognition phase
.l-sub-section
h3 deactivate
pre.prettyprint
code.
deactivate(nextInstruction: Instruction)
:markdown