Skip to content

Commit 8907fd8

Browse files
Update RC.1 docs
1 parent d481907 commit 8907fd8

15 files changed

+439
-143
lines changed

_ng1_docs/1.0.0-rc.1/assets/js/search.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

_ng1_docs/1.0.0-rc.1/classes/view.viewservice.html

+99-2
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@ <h3>Methods</h3>
139139
<li class="tsd-kind-method tsd-parent-kind-class"><a href="view.viewservice.html#deactivateviewconfig" class="tsd-kind-icon">deactivate<wbr>View<wbr>Config</a></li>
140140
<li class="tsd-kind-method tsd-parent-kind-class"><a href="view.viewservice.html#registeruiview" class="tsd-kind-icon">registerUIView</a></li>
141141
<li class="tsd-kind-method tsd-parent-kind-class"><a href="view.viewservice.html#sync" class="tsd-kind-icon">sync</a></li>
142+
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-static tsd-is-external"><a href="view.viewservice.html#matches" class="tsd-kind-icon">matches</a></li>
142143
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-static"><a href="view.viewservice.html#normalizeuiviewtarget" class="tsd-kind-icon">normalizeUIView<wbr>Target</a></li>
143144
</ul>
144145
</section>
@@ -498,7 +499,7 @@ <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">(Anonymou
498499
<hr>
499500
<aside class="tsd-sources">
500501
<ul>
501-
<li>Defined in <a href="https://github.com/ui-router/core/blob/48c5af6/src/view/view.ts#L219">ui-router-core/src/view/view.ts:219</a></li>
502+
<li>Defined in <a href="https://github.com/ui-router/core/blob/48c5af6/src/view/view.ts#L221">ui-router-core/src/view/view.ts:221</a></li>
502503
</ul>
503504
</aside> </li>
504505
</ul>
@@ -519,7 +520,98 @@ <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</spa
519520
<hr>
520521
<aside class="tsd-sources">
521522
<ul>
522-
<li>Defined in <a href="https://github.com/ui-router/core/blob/48c5af6/src/view/view.ts#L87">ui-router-core/src/view/view.ts:87</a></li>
523+
<li>Defined in <a href="https://github.com/ui-router/core/blob/48c5af6/src/view/view.ts#L166">ui-router-core/src/view/view.ts:166</a></li>
524+
</ul>
525+
</aside> </li>
526+
</ul>
527+
</section>
528+
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-static tsd-is-external">
529+
<a name="matches" class="tsd-anchor"></a>
530+
<!--
531+
<h3><span class="tsd-flag ts-flagStatic">Static</span> matches</h3>
532+
-->
533+
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-static tsd-is-external">
534+
<li class="tsd-signature tsd-kind-icon">matches<span class="tsd-signature-symbol">(</span>uiViewsByFqn<span class="tsd-signature-symbol">: </span><a href="../interfaces/common.typedmap.html" class="tsd-signature-type">TypedMap</a><span class="tsd-signature-symbol">&lt;</span><a href="../interfaces/view.activeuiview.html" class="tsd-signature-type">ActiveUIView</a><span class="tsd-signature-symbol">&gt;</span>, uiView<span class="tsd-signature-symbol">: </span><a href="../interfaces/view.activeuiview.html" class="tsd-signature-type">ActiveUIView</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">(Anonymous function)</span></li>
535+
<li class="tsd-header">
536+
<p> Given a ui-view and a ViewConfig, determines if they &quot;match&quot;. </p>
537+
</li>
538+
</ul>
539+
<ul class="tsd-descriptions">
540+
<li class="tsd-description">
541+
<div class="tsd-comment tsd-typography">
542+
<div class="lead">
543+
<p>Given a ui-view and a ViewConfig, determines if they &quot;match&quot;.</p>
544+
</div>
545+
<p>A ui-view has a fully qualified name (fqn) and a context object. The fqn is built from its overall location in
546+
the DOM, describing its nesting relationship to any parent ui-view tags it is nested inside of.</p>
547+
<p>A ViewConfig has a target ui-view name and a context anchor. The ui-view name can be a simple name, or
548+
can be a segmented ui-view path, describing a portion of a ui-view fqn.</p>
549+
<p>In order for a ui-view to match ViewConfig, ui-view&#39;s $type must match the ViewConfig&#39;s $type</p>
550+
<p>If the ViewConfig&#39;s target ui-view name is a simple name (no dots), then a ui-view matches if:</p>
551+
<ul>
552+
<li>the ui-view&#39;s name matches the ViewConfig&#39;s target name</li>
553+
<li>the ui-view&#39;s context matches the ViewConfig&#39;s anchor</li>
554+
</ul>
555+
<p>If the ViewConfig&#39;s target ui-view name is a segmented name (with dots), then a ui-view matches if:</p>
556+
<ul>
557+
<li>There exists a parent ui-view where:<ul>
558+
<li>the parent ui-view&#39;s name matches the first segment (index 0) of the ViewConfig&#39;s target name</li>
559+
<li>the parent ui-view&#39;s context matches the ViewConfig&#39;s anchor</li>
560+
</ul>
561+
</li>
562+
<li>And the remaining segments (index 1..n) of the ViewConfig&#39;s target name match the tail of the ui-view&#39;s fqn</li>
563+
</ul>
564+
<p>Example:</p>
565+
<p>DOM:</p>
566+
<p><ui-view> <!-- created in the root context (name: "") -->
567+
<ui-view name="foo"> <!-- created in the context named: "A" -->
568+
<ui-view> <!-- created in the context named: "A.B" -->
569+
<ui-view name="bar"> <!-- created in the context named: "A.B.C" -->
570+
</ui-view>
571+
</ui-view>
572+
</ui-view>
573+
</ui-view></p>
574+
<p>uiViews: [
575+
{ fqn: &quot;$default&quot;, creationContext: { name: &quot;&quot; } },
576+
{ fqn: &quot;$default.foo&quot;, creationContext: { name: &quot;A&quot; } },
577+
{ fqn: &quot;$default.foo.$default&quot;, creationContext: { name: &quot;A.B&quot; } }
578+
{ fqn: &quot;$default.foo.$default.bar&quot;, creationContext: { name: &quot;A.B.C&quot; } }
579+
]</p>
580+
<p>These four view configs all match the ui-view with the fqn: &quot;$default.foo.$default.bar&quot;:</p>
581+
<ul>
582+
<li>ViewConfig1: { uiViewName: &quot;bar&quot;, uiViewContextAnchor: &quot;A.B.C&quot; }</li>
583+
<li>ViewConfig2: { uiViewName: &quot;$default.bar&quot;, uiViewContextAnchor: &quot;A.B&quot; }</li>
584+
<li>ViewConfig3: { uiViewName: &quot;foo.$default.bar&quot;, uiViewContextAnchor: &quot;A&quot; }</li>
585+
<li>ViewConfig4: { uiViewName: &quot;$default.foo.$default.bar&quot;, uiViewContextAnchor: &quot;&quot; }</li>
586+
</ul>
587+
<p>Using ViewConfig3 as an example, it matches the ui-view with fqn &quot;$default.foo.$default.bar&quot; because:</p>
588+
<ul>
589+
<li>The ViewConfig&#39;s segmented target name is: [ &quot;foo&quot;, &quot;$default&quot;, &quot;bar&quot; ]</li>
590+
<li>There exists a parent ui-view (which has fqn: &quot;$default.foo&quot;) where:<ul>
591+
<li>the parent ui-view&#39;s name &quot;foo&quot; matches the first segment &quot;foo&quot; of the ViewConfig&#39;s target name</li>
592+
<li>the parent ui-view&#39;s context &quot;A&quot; matches the ViewConfig&#39;s anchor context &quot;A&quot;</li>
593+
</ul>
594+
</li>
595+
<li>And the remaining segments [ &quot;$default&quot;, &quot;bar&quot; ].join(&quot;.&quot;_ of the ViewConfig&#39;s target name match
596+
the tail of the ui-view&#39;s fqn &quot;default.bar&quot;</li>
597+
</ul>
598+
</div>
599+
<h4 class="tsd-parameters-title">Parameters</h4>
600+
<ul class="tsd-parameters">
601+
<li>
602+
<h5>uiViewsByFqn <a href="../interfaces/common.typedmap.html" class="tsd-signature-type">TypedMap</a><span class="tsd-signature-symbol">&lt;</span><a href="../interfaces/view.activeuiview.html" class="tsd-signature-type">ActiveUIView</a><span class="tsd-signature-symbol">&gt;</span></h5>
603+
</li>
604+
<li>
605+
<h5>uiView <a href="../interfaces/view.activeuiview.html" class="tsd-signature-type">ActiveUIView</a></h5>
606+
</li>
607+
</ul>
608+
<div class="tsd-returns">
609+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">(Anonymous function)</span></h4>
610+
</div>
611+
<hr>
612+
<aside class="tsd-sources">
613+
<ul>
614+
<li>Defined in <a href="https://github.com/ui-router/core/blob/48c5af6/src/view/view.ts#L144">ui-router-core/src/view/view.ts:144</a></li>
523615
</ul>
524616
</aside> </li>
525617
</ul>
@@ -541,6 +633,8 @@ <h3><span class="tsd-flag ts-flagStatic">Static</span> normalizeUIView<wbr>Targe
541633
<div class="lead">
542634
<p>Normalizes a view&#39;s name from a state.views configuration block.</p>
543635
</div>
636+
<p>This should be used by a framework implementation to calculate the values for
637+
<a href="../interfaces/state._viewdeclaration.html#_uiviewname">_ViewDeclaration.$uiViewName</a> and <a href="../interfaces/state._viewdeclaration.html#_uiviewcontextanchor">_ViewDeclaration.$uiViewContextAnchor</a>.</p>
544638
</div>
545639
<h4 class="tsd-parameters-title">Parameters</h4>
546640
<ul class="tsd-parameters">
@@ -786,6 +880,9 @@ <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Array</sp
786880
<li class=" tsd-kind-method tsd-parent-kind-class">
787881
<a href="view.viewservice.html#sync" class="tsd-kind-icon">sync</a>
788882
</li>
883+
<li class=" tsd-kind-method tsd-parent-kind-class tsd-is-static tsd-is-external">
884+
<a href="view.viewservice.html#matches" class="tsd-kind-icon">matches</a>
885+
</li>
789886
<li class=" tsd-kind-method tsd-parent-kind-class tsd-is-static">
790887
<a href="view.viewservice.html#normalizeuiviewtarget" class="tsd-kind-icon">normalizeUIView<wbr>Target</a>
791888
</li>

_ng1_docs/1.0.0-rc.1/interfaces/ng1.ng1controller.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ <h4 id="example-">Example:</h4>
165165

166166
<span class="hljs-keyword">this</span>.uiCanExit = <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params"></span>) </span>{
167167
<span class="hljs-keyword">if</span> (!angular.equals(<span class="hljs-keyword">this</span>.data, <span class="hljs-keyword">this</span>.originalData) {
168-
<span class="hljs-comment">// <span class="hljs-doctag">Note:</span> This could also return a Promise and request async</span>
168+
<span class="hljs-comment">// Note: This could also return a Promise and request async</span>
169169
<span class="hljs-comment">// confirmation using something like ui-bootstrap $modal</span>
170170
<span class="hljs-keyword">return</span> <span class="hljs-built_in">window</span>.confirm(<span class="hljs-string">"Data has changed. Exit anyway and lose changes?"</span>);
171171
}

0 commit comments

Comments
 (0)