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

91 lines
1.4 KiB
Plaintext
Raw Normal View History

2015-06-01 22:51:00 -07:00
p.location-badge.
exported from <a href='../router'>angular2/router</a>
defined in <a href="https://github.com/angular/angular/tree/master/modules/angular2/src/router/router_outlet.js#L10-L93">angular2/src/router/router_outlet.js (line 10)</a>
:markdown
A router outlet is a placeholder that Angular dynamically fills based on the application's route.
## Use
```
<router-outlet></router-outlet>
```
Route outlets can also optionally have a name:
```
<router-outlet name="side"></router-outlet>
<router-outlet name="main"></router-outlet>
```
.l-main-section
h2 Members
.l-sub-section
h3 constructor
pre.prettyprint
code.
constructor(elementRef:ElementRef, loader:DynamicComponentLoader, router:routerMod.Router, injector:Injector, @Attribute(&#39;name&#39;) nameAttr:String)
:markdown
.l-sub-section
h3 activate
pre.prettyprint
code.
activate(instruction:Instruction)
:markdown
Given an instruction, update the contents of this viewport.
.l-sub-section
h3 canDeactivate
pre.prettyprint
code.
canDeactivate(instruction:Instruction)
:markdown
.l-sub-section
h3 deactivate
pre.prettyprint
code.
deactivate()
:markdown