angular-docs-cn/public/docs/js/latest/api/router/ComponentInstruction-interface.jade

120 lines
1.7 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.37/modules/angular2/src/router/instruction.ts#L76-L111">angular2/src/router/instruction.ts (line 76)</a>
:markdown
A `ComponentInstruction` represents the route state for a single component. An `Instruction` is
composed of a tree of these `ComponentInstruction`s.
`ComponentInstructions` is a public API. Instances of `ComponentInstruction` are passed
to route lifecycle hooks, like <a href='CanActivate-var.html'><code>CanActivate</code></a>.
`ComponentInstruction`s are [https://en.wikipedia.org/wiki/Hash_consing](hash consed). You should
never construct one yourself with "new." Instead, rely on <a href='Router/PathRecognizer'>PathRecognizer</a> to
construct
`ComponentInstruction`s.
You should not modify this object. It should be treated as immutable.
.l-main-section
h2 Members
.l-sub-section
h3#reuse reuse
:markdown
.l-sub-section
h3#urlPath urlPath
:markdown
.l-sub-section
h3#urlParams urlParams
:markdown
.l-sub-section
h3#params params
:markdown
.l-sub-section
h3#componentType componentType
:markdown
.l-sub-section
h3#resolveComponentType resolveComponentType
pre.prettyprint
code.
resolveComponentType()
:markdown
.l-sub-section
h3#specificity specificity
:markdown
.l-sub-section
h3#terminal terminal
:markdown
.l-sub-section
h3#routeData routeData
pre.prettyprint
code.
routeData()
:markdown