84 lines
1.2 KiB
Plaintext
84 lines
1.2 KiB
Plaintext
|
|
p.location-badge.
|
|
exported from <a href='../router'>angular2/router</a>
|
|
defined in <a href="https://github.com/angular/angular/tree/3a0410a/modules/angular2/src/router/router_outlet.ts#L9-L91">angular2/src/router/router_outlet.ts (line 9)</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 Members
|
|
.l-sub-section
|
|
h3 constructor
|
|
|
|
|
|
pre.prettyprint
|
|
code.
|
|
constructor(elementRef: ElementRef, _loader: DynamicComponentLoader, _parentRouter:Router, _injector: Injector, nameAttr: string)
|
|
|
|
:markdown
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.l-sub-section
|
|
h3 activate
|
|
|
|
|
|
pre.prettyprint
|
|
code.
|
|
activate(instruction: Instruction)
|
|
|
|
:markdown
|
|
|
|
Given an instruction, update the contents of this outlet.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.l-sub-section
|
|
h3 deactivate
|
|
|
|
|
|
pre.prettyprint
|
|
code.
|
|
deactivate()
|
|
|
|
:markdown
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.l-sub-section
|
|
h3 canDeactivate
|
|
|
|
|
|
pre.prettyprint
|
|
code.
|
|
canDeactivate(instruction: Instruction)
|
|
|
|
:markdown
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|