angular-cn/aio/content/guide/api-page-class.md

416 lines
17 KiB
Markdown
Raw Normal View History

<div class="breadcrumb">
2018-03-03 08:06:01 -05:00
<a href="#">API<a> / <a href="#">@core<a>
2018-03-03 08:06:01 -05:00
</div>
2018-03-03 08:06:01 -05:00
<header class="api-header">
2018-03-03 08:06:01 -05:00
2018-03-06 21:51:31 -05:00
<h1><label class="api-status-label experimental">experimental</label><label class="api-type-label class">class</label>Class Name</h1>
2018-03-03 08:06:01 -05:00
</header>
2018-03-03 08:06:01 -05:00
<div class="page-actions">
2018-03-03 08:06:01 -05:00
<a href="#"><label class="raised page-label"><i class="material-icons">mode_edit</i>suggest edits</label></a>
<a href="#"><label class="raised page-label"><i class="material-icons">code</i>view source</label></a>
2018-03-03 08:06:01 -05:00
</div>
2018-03-03 08:06:01 -05:00
<p>
2018-03-06 21:51:31 -05:00
Class description goes here. This is a short and to the point one or two sentence description that easily introduces the reader to the class.
</p>
2018-03-03 08:06:01 -05:00
<div class="api-body">
2018-03-03 08:06:01 -05:00
<section>
2018-03-03 08:06:01 -05:00
<h2>Overview</h2>
2018-03-03 08:06:01 -05:00
<code-example language="ts" hidecopy="true" ng-version="5.2.0"><aio-code class="simple-code" ng-reflect-ng-class="[object Object]" ng-reflect-code="
class <a href=&quot;api/core/Compi" ng-reflect-hide-copy="true" ng-reflect-language="ts" ng-reflect-linenums="" ng-reflect-path="" ng-reflect-region="" ng-reflect-title=""><pre class="prettyprint lang-ts">
<code class="animated fadeIn"><span class="kwd">class</span><span class="pln"> </span><a href="api/core/Compiler" class="code-anchor"><span class="typ">Compiler</span></a><span class="pln"> </span><span class="pun">{</span><span class="pln">
</span><a class="code-anchor" href="api/core/Compiler#compileModuleSync"><span class="pln">compileModuleSync</span><span class="pun">&lt;</span><span class="pln">T</span><span class="pun">&gt;(</span><span class="pln">moduleType</span><span class="pun">:</span><span class="pln"> </span><span class="typ">Type</span><span class="pun">&lt;</span><span class="pln">T</span><span class="pun">&gt;):</span><span class="pln"> </span><span class="typ">NgModuleFactory</span><span class="pun">&lt;</span><span class="pln">T</span><span class="pun">&gt;</span></a><span class="pln">
</span><a class="code-anchor" href="api/core/Compiler#compileModuleAsync"><span class="pln">compileModuleAsync</span><span class="pun">&lt;</span><span class="pln">T</span><span class="pun">&gt;(</span><span class="pln">moduleType</span><span class="pun">:</span><span class="pln"> </span><span class="typ">Type</span><span class="pun">&lt;</span><span class="pln">T</span><span class="pun">&gt;):</span><span class="pln"> </span><span class="typ">Promise</span><span class="pun">&lt;</span><span class="typ">NgModuleFactory</span><span class="pun">&lt;</span><span class="pln">T</span><span class="pun">&gt;&gt;</span></a><span class="pln">
</span><a class="code-anchor" href="api/core/Compiler#compileModuleAndAllComponentsSync"><span class="pln">compileModuleAndAllComponentsSync</span><span class="pun">&lt;</span><span class="pln">T</span><span class="pun">&gt;(</span><span class="pln">moduleType</span><span class="pun">:</span><span class="pln"> </span><span class="typ">Type</span><span class="pun">&lt;</span><span class="pln">T</span><span class="pun">&gt;):</span><span class="pln"> </span><span class="typ">ModuleWithComponentFactories</span><span class="pun">&lt;</span><span class="pln">T</span><span class="pun">&gt;</span></a><span class="pln">
</span><a class="code-anchor" href="api/core/Compiler#compileModuleAndAllComponentsAsync"><span class="pln">compileModuleAndAllComponentsAsync</span><span class="pun">&lt;</span><span class="pln">T</span><span class="pun">&gt;(</span><span class="pln">moduleType</span><span class="pun">:</span><span class="pln"> </span><span class="typ">Type</span><span class="pun">&lt;</span><span class="pln">T</span><span class="pun">&gt;):</span><span class="pln"> </span><span class="typ">Promise</span><span class="pun">&lt;</span><span class="typ">ModuleWithComponentFactories</span><span class="pun">&lt;</span><span class="pln">T</span><span class="pun">&gt;&gt;</span></a><span class="pln">
</span><a class="code-anchor" href="api/core/Compiler#clearCache"><span class="pln">clearCache</span><span class="pun">():</span><span class="pln"> </span><span class="kwd">void</span></a><span class="pln">
</span><a class="code-anchor" href="api/core/Compiler#clearCacheFor"><span class="pln">clearCacheFor</span><span class="pun">(</span><span class="pln">type</span><span class="pun">:</span><span class="pln"> </span><span class="typ">Type</span><span class="pun">&lt;</span><span class="pln">any</span><span class="pun">&gt;)</span></a><span class="pln">
</span><span class="pun">}</span></code>
</pre></aio-code></code-example>
</section>
<section>
2018-03-03 08:06:01 -05:00
<h2>Description</h2>
2018-03-03 08:06:01 -05:00
<p>
2018-03-06 21:51:31 -05:00
The longer class description goes here which can include multiple paragraphs.
2018-03-06 21:51:31 -05:00
</p>
2018-03-03 08:06:01 -05:00
</p>Bacon ipsum dolor amet pork belly capicola sirloin venison alcatra ground round ham hock jowl turkey picanha bresaola pancetta brisket chicken fatback. Burgdoggen kevin salami jowl shoulder jerky leberkas meatball. Ham hock picanha burgdoggen pork belly rump bacon cupim. Bacon kielbasa sirloin shank strip steak ground round. Bresaola cow salami meatloaf pork chop leberkas flank turducken biltong meatball chuck pork tri-tip chicken. Ribeye corned beef shoulder, meatloaf strip steak jerky porchetta capicola alcatra ham.</p>
2018-03-03 08:06:01 -05:00
<h3>Subclasses</h3>
2018-03-03 08:06:01 -05:00
<ul>
2018-03-03 08:06:01 -05:00
<li>
<a href="#">Subclass1</a>
2018-03-03 08:06:01 -05:00
</li>
2018-03-03 08:06:01 -05:00
<li>
<a href="#">Subclass2</a>
</li>
<li>
<a href="#">Subclass3</a>
</li>
2018-03-03 08:06:01 -05:00
</ul>
2018-03-03 08:06:01 -05:00
<h3>See Also</h3>
2018-03-03 08:06:01 -05:00
<ul>
2018-03-03 08:06:01 -05:00
<li>
2018-03-03 08:06:01 -05:00
<a href="#">Link1</a>
2018-03-03 08:06:01 -05:00
</li>
2018-03-03 08:06:01 -05:00
<li>
<a href="#">Link2</a>
</li>
2018-03-03 08:06:01 -05:00
</ul>
</section>
<section>
2018-03-03 08:06:01 -05:00
<h2>Constructor</h2>
2018-03-03 08:06:01 -05:00
<code-example hidecopy="true" class="no-box api-heading" ng-version="5.2.0">
2018-03-06 21:51:31 -05:00
<aio-code class="simple-code"><pre class="prettyprint lang-">
<code class="animated fadeIn"><span class="kwd">constructor</span><span class="pun">(</span><span class="pln">element</span><span class="pun">:</span><span class="pln"> any</span><span class="pun">,</span><span class="pln"> keyframes</span><span class="pun">:</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
</span><span class="pun">[</span><span class="pln">key</span><span class="pun">:</span><span class="pln"> </span><span class="kwd">string</span><span class="pun">]:</span><span class="pln"> </span><span class="kwd">string</span><span class="pln"> </span><span class="pun">|</span><span class="pln"> number</span><span class="pun">;</span><span class="pln">
</span><span class="pun">}[],</span><span class="pln"> duration</span><span class="pun">:</span><span class="pln"> number</span><span class="pun">,</span><span class="pln"> delay</span><span class="pun">:</span><span class="pln"> number</span><span class="pun">,</span><span class="pln"> easing</span><span class="pun">:</span><span class="pln"> </span><span class="kwd">string</span><span class="pun">,</span><span class="pln"> previousPlayers</span><span class="pun">:</span><span class="pln"> any</span><span class="pun">[])</span></code>
</pre></aio-code></code-example>
</section>
<section>
2018-03-03 08:06:01 -05:00
<h2>Properties</h2>
2018-03-03 08:06:01 -05:00
<table class="is-full-width list-table">
2018-03-03 08:06:01 -05:00
<thead>
2018-03-03 08:06:01 -05:00
<tr>
2018-03-03 08:06:01 -05:00
<th>
Property
属性
</th>
<th>
Type
绑定类型
</th>
<th>
2018-03-03 08:06:01 -05:00
Description
2018-03-03 08:06:01 -05:00
描述
</th>
2018-03-03 08:06:01 -05:00
</tr>
2018-03-03 08:06:01 -05:00
</thead>
2018-03-03 08:06:01 -05:00
<tbody>
<tr>
2018-03-03 08:06:01 -05:00
<td>
2018-03-03 08:06:01 -05:00
<code><strong>Property1</strong></code>
2018-03-03 08:06:01 -05:00
</td>
2018-03-03 08:06:01 -05:00
<td>
2018-03-03 08:06:01 -05:00
<label class="property-type-label type">Type</label>
2018-03-03 08:06:01 -05:00
</td>
2018-03-03 08:06:01 -05:00
<td>
Description goes here
</td>
</tr>
<tr>
2018-03-03 08:06:01 -05:00
<td>
2018-03-03 08:06:01 -05:00
<code><strong>Property2</strong></code>
2018-03-03 08:06:01 -05:00
</td>
2018-03-03 08:06:01 -05:00
<td>
2018-03-03 08:06:01 -05:00
Type
2018-03-03 08:06:01 -05:00
绑定类型
</td>
<td>
Description goes here
2018-03-03 08:06:01 -05:00
</td>
</tr>
<tr>
2018-03-03 08:06:01 -05:00
<td>
2018-03-03 08:06:01 -05:00
<code><strong>Property3</strong></code>
2018-03-03 08:06:01 -05:00
</td>
2018-03-03 08:06:01 -05:00
<td>
2018-03-03 08:06:01 -05:00
Type
2018-03-03 08:06:01 -05:00
绑定类型
2018-03-03 08:06:01 -05:00
</td>
2018-03-03 08:06:01 -05:00
<td>
2018-03-03 08:06:01 -05:00
Description goes here
2018-03-03 08:06:01 -05:00
</td>
</tr>
</tbody>
</table>
</section>
<section class="api-method">
2018-03-03 08:06:01 -05:00
<h2>Methods</h2>
2018-03-03 08:06:01 -05:00
<table class="is-full-width item-table">
2018-03-03 08:06:01 -05:00
<thead>
2018-03-03 08:06:01 -05:00
<tr>
2018-03-03 08:06:01 -05:00
<th>
Method1Name( )
</th>
2018-03-03 08:06:01 -05:00
</tr>
2018-03-03 08:06:01 -05:00
</thead>
2018-03-03 08:06:01 -05:00
<tbody>
<tr>
2018-03-03 08:06:01 -05:00
<td>
2018-03-03 08:06:01 -05:00
<p>
2018-03-06 21:51:31 -05:00
Description goes here
2018-03-06 21:51:31 -05:00
</p>
2018-03-03 08:06:01 -05:00
<br>
2018-03-03 08:06:01 -05:00
<p>
2018-03-06 21:51:31 -05:00
Bacon ipsum dolor amet pork belly capicola sirloin venison alcatra ground round ham hock jowl turkey picanha bresaola pancetta brisket chicken fatback. Burgdoggen kevin salami jowl shoulder jerky leberkas meatball. Ham hock picanha burgdoggen pork belly rump bacon cupim. Bacon kielbasa sirloin shank strip steak ground round. Bresaola cow salami meatloaf pork chop leberkas flank turducken biltong meatball chuck pork tri-tip chicken. Ribeye corned beef shoulder, meatloaf strip steak jerky porchetta capicola alcatra ham.
2018-03-06 21:51:31 -05:00
</p>
2018-03-03 08:06:01 -05:00
</td>
2018-03-03 08:06:01 -05:00
</tr>
</tbody>
</table>
<table class="is-full-width api-method item-table">
2018-03-03 08:06:01 -05:00
<thead>
2018-03-03 08:06:01 -05:00
<tr>
2018-03-03 08:06:01 -05:00
<th>
Method2Name( )
</th>
2018-03-03 08:06:01 -05:00
</tr>
2018-03-03 08:06:01 -05:00
</thead>
2018-03-03 08:06:01 -05:00
<tbody>
<tr>
2018-03-03 08:06:01 -05:00
<td>
2018-03-03 08:06:01 -05:00
<p>
2018-03-06 21:51:31 -05:00
Description goes here
2018-03-06 21:51:31 -05:00
</p>
2018-03-03 08:06:01 -05:00
<hr>
2018-03-03 08:06:01 -05:00
<h5>Declaration</h5>
2018-03-03 08:06:01 -05:00
<code-example language="ts" hidecopy="true" ng-version="5.2.0">
2018-03-06 21:51:31 -05:00
<aio-code class="simple-code"><pre class="prettyprint lang-ts">
<code class="animated fadeIn"><span class="kwd">class</span><span class="pln"> </span><a href="api/animations/AnimationBuilder" class="code-anchor"><span class="typ">AnimationBuilder</span></a><span class="pln"> </span><span class="pun">{</span><span class="pln"></span><a class="code-anchor" href="api/animations/AnimationBuilder#build"><span class="pln">build</span><span class="pun">(</span><span class="pln">animation</span><span class="pun">:</span><span class="pln"> </span><span class="typ">AnimationMetadata</span><span class="pln"> </span><span class="pun">|</span><span class="pln"> </span><span class="typ">AnimationMetadata</span><span class="pun">[]):</span><span class="pln"> </span><span class="typ">AnimationFactory</span></a><span class="pln"></span><span class="pun">}</span></code></pre>
</aio-code>
2018-03-06 21:51:31 -05:00
</code-example>
2018-03-03 08:06:01 -05:00
<h6>Parameters</h6>
2018-03-03 08:06:01 -05:00
<h6>Returns</h6>
2018-03-03 08:06:01 -05:00
<p>
2018-03-06 21:51:31 -05:00
Returns information and results goes here.
2018-03-06 21:51:31 -05:00
</p>
2018-03-03 08:06:01 -05:00
<h6>Errors</h6>
2018-03-03 08:06:01 -05:00
<p>
2018-03-06 21:51:31 -05:00
Error information goes here
2018-03-06 21:51:31 -05:00
</p>
2018-03-03 08:06:01 -05:00
<hr>
2018-03-03 08:06:01 -05:00
<p>Further details provided as needed. Bacon ipsum dolor amet pork belly capicola sirloin venison alcatra ground round ham hock jowl turkey picanha bresaola pancetta brisket chicken fatback. Burgdoggen kevin salami jowl shoulder jerky leberkas meatball.</p><hr>
2018-03-03 08:06:01 -05:00
<h6>Overloads</h6>
2018-03-03 08:06:01 -05:00
<table class="is-full-width">
<tbody>
<tr>
2018-03-03 08:06:01 -05:00
<td>
2018-03-03 08:06:01 -05:00
<code-example hidecopy="true" class="no-box api-heading" ng-version="5.2.0">
2018-03-06 21:51:31 -05:00
<aio-code class="simple-code"><pre class="prettyprint lang-">
<code class="animated fadeIn"><span class="kwd">constructor</span><span class="pun">(</span><span class="pln">element</span><span class="pun">:</span><span class="pln"> any</span><span class="pun">,</span><span class="pln"> keyframes</span><span class="pun">:</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
</span><span class="pun">[</span><span class="pln">key</span><span class="pun">:</span><span class="pln"> </span><span class="kwd">string</span><span class="pun">]:</span><span class="pln"> </span><span class="kwd">string</span><span class="pln"> </span><span class="pun">|</span><span class="pln"> number</span><span class="pun">;</span><span class="pln">
</span><span class="pun">}[],</span><span class="pln"> duration</span><span class="pun">:</span><span class="pln"> number</span><span class="pun">,</span><span class="pln"> delay</span><span class="pun">:</span><span class="pln"> number</span><span class="pun">,</span><span class="pln"> easing</span><span class="pun">:</span><span class="pln"> </span><span class="kwd">string</span><span class="pun">,</span><span class="pln"> previousPlayers</span><span class="pun">:</span><span class="pln"> any</span><span class="pun">[])</span></code>
</pre></aio-code></code-example>
2018-03-03 08:06:01 -05:00
</td>
2018-03-03 08:06:01 -05:00
<td>
2018-03-03 08:06:01 -05:00
Description goes here
2018-03-03 08:06:01 -05:00
</td>
</tr>
<tr>
2018-03-03 08:06:01 -05:00
<td>
2018-03-03 08:06:01 -05:00
<code-example hidecopy="true" class="no-box api-heading" ng-version="5.2.0">
2018-03-06 21:51:31 -05:00
<aio-code class="simple-code"><pre class="prettyprint lang-">
<code class="animated fadeIn"><span class="kwd">constructor</span><span class="pun">(</span><span class="pln">element</span><span class="pun">:</span><span class="pln"> any</span><span class="pun">,</span><span class="pln"> keyframes</span><span class="pun">:</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
</span><span class="pun">[</span><span class="pln">key</span><span class="pun">:</span><span class="pln"> </span><span class="kwd">string</span><span class="pun">]:</span><span class="pln"> </span><span class="kwd">string</span><span class="pln"> </span><span class="pun">|</span><span class="pln"> number</span><span class="pun">;</span><span class="pln">
</span><span class="pun">}[],</span><span class="pln"> duration</span><span class="pun">:</span><span class="pln"> number</span><span class="pun">,</span><span class="pln"> delay</span><span class="pun">:</span><span class="pln"> number</span><span class="pun">,</span><span class="pln"> easing</span><span class="pun">:</span><span class="pln"> </span><span class="kwd">string</span><span class="pun">,</span><span class="pln"> previousPlayers</span><span class="pun">:</span><span class="pln"> any</span><span class="pun">[])</span></code>
</pre></aio-code></code-example>
2018-03-03 08:06:01 -05:00
</td>
2018-03-03 08:06:01 -05:00
<td>
2018-03-03 08:06:01 -05:00
Description goes here
2018-03-03 08:06:01 -05:00
</td>
2018-03-03 08:06:01 -05:00
</tr>
</tbody>
</table>
2018-03-03 08:06:01 -05:00
<hr>
2018-03-03 08:06:01 -05:00
<h5>Example: Descriptive Title of Method Example</h5>
2018-03-03 08:06:01 -05:00
<p>
2018-03-06 21:51:31 -05:00
Bacon ipsum dolor amet pork belly capicola sirloin venison alcatra ground round ham hock jowl turkey picanha bresaola pancetta brisket chicken fatback. Burgdoggen kevin salami jowl shoulder jerky leberkas meatball. Ham hock picanha burgdoggen pork belly rump bacon cupim. Bacon kielbasa sirloin shank strip steak ground round. Bresaola cow salami meatloaf pork chop leberkas flank turducken biltong meatball chuck pork tri-tip chicken. Ribeye corned beef shoulder, meatloaf strip steak jerky porchetta capicola alcatra ham.
2018-03-06 21:51:31 -05:00
</p>
2018-03-03 08:06:01 -05:00
</td>
2018-03-03 08:06:01 -05:00
</tr>
</tbody>
</table>
</section>
<section>
2018-03-03 08:06:01 -05:00
<h2>Example: Descriptive Title of Combined Example Goes Here</h2>
2018-03-03 08:06:01 -05:00
<p>
2018-03-03 08:06:01 -05:00
2018-03-06 21:51:31 -05:00
Intro description text about what the example is and how it can be used.
2018-03-03 08:06:01 -05:00
2018-03-06 21:51:31 -05:00
</p>
2018-03-03 08:06:01 -05:00
<code-example hidecopy="true" class="no-box api-heading" ng-version="5.2.0">
2018-03-06 21:51:31 -05:00
<aio-code class="simple-code"><pre class="prettyprint lang-">
<code class="animated fadeIn"><span class="kwd">constructor</span><span class="pun">(</span><span class="pln">element</span><span class="pun">:</span><span class="pln"> any</span><span class="pun">,</span><span class="pln"> keyframes</span><span class="pun">:</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
</span><span class="pun">[</span><span class="pln">key</span><span class="pun">:</span><span class="pln"> </span><span class="kwd">string</span><span class="pun">]:</span><span class="pln"> </span><span class="kwd">string</span><span class="pln"> </span><span class="pun">|</span><span class="pln"> number</span><span class="pun">;</span><span class="pln">
</span><span class="pun">}[],</span><span class="pln"> duration</span><span class="pun">:</span><span class="pln"> number</span><span class="pun">,</span><span class="pln"> delay</span><span class="pun">:</span><span class="pln"> number</span><span class="pun">,</span><span class="pln"> easing</span><span class="pun">:</span><span class="pln"> </span><span class="kwd">string</span><span class="pun">,</span><span class="pln"> previousPlayers</span><span class="pun">:</span><span class="pln"> any</span><span class="pun">[])</span></code>
</pre></aio-code></code-example>
2018-03-03 08:06:01 -05:00
<p>
2018-03-06 21:51:31 -05:00
Further explanation provided as needed. Bacon ipsum dolor amet pork belly capicola sirloin venison alcatra ground round ham hock jowl turkey picanha bresaola pancetta brisket chicken fatback. Burgdoggen kevin salami jowl shoulder jerky leberkas meatball.
2018-03-06 21:51:31 -05:00
</p>
2018-03-03 08:06:01 -05:00
</section>
2018-03-03 08:06:01 -05:00
</div>