Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 5619356

Browse files
0x-r4bbitwardbell
authored andcommitted
docs(template-syntax): add "Table of Contents"
prototype for standard ToC across all docs. closes angular#882
1 parent f41517a commit 5619356

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

public/docs/ts/latest/guide/template-syntax.jade

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@ include ../_util-fns
66

77
Many of us are familiar with the component/template duality from our experience with model-view-controller (MVC) or model-view-viewmodel (MVVM). In Angular, the component plays the part of the controller/viewmodel, and the template represents the view.
88

9-
Let’s find out what it takes to write a template for our view. We’ll cover these basic elements of template syntax:
9+
Let’s find out what it takes to write a template for our view. We’ll cover these basic elements of template syntax.
10+
11+
# Table Of Contents
1012

1113
* [HTML](#html)
1214
* [Interpolation](#interpolation)
@@ -27,11 +29,14 @@ include ../_util-fns
2729
* [Local template variables](#local-vars)
2830
* [Input and output properties](#inputs-outputs)
2931
* [Template expression operators](#expression-operators)
32+
* [pipe](#pipe)
33+
* ["elvis" (?.)](#elvis)
3034
// #enddocregion intro
31-
32-
:marked
33-
[Run the live example](/resources/live-examples/template-syntax/ts/plnkr.html)
34-
35+
.l-sub-section
36+
:marked
37+
The [live example](/resources/live-examples/template-syntax/ts/plnkr.html)
38+
demonstrates all of the syntax and code snippets described in this chapter.
39+
3540
// #docregion html-1
3641
.l-main-section
3742
:marked
@@ -1596,7 +1601,7 @@ figure.image-display
15961601
<a id="elvis"></a>
15971602
### The Elvis operator ( ?. ) and null property paths
15981603

1599-
The Angular **Elvis operator (`?.`)** is a fluent and convenient way to guard against null and undefined values in property paths.
1604+
The Angular **Elvis operator (`?.`)** &mdash; perhaps better described as the "safe navigation operator" &mdash; is a fluent and convenient way to guard against null and undefined values in property paths.
16001605
Here it is, protecting against a view render failure if the `currentHero` is null.
16011606
// #enddocregion expression-operators-elvis-1
16021607
+makeExample('template-syntax/ts/app/app.component.html', 'elvis-2')(format=".")

0 commit comments

Comments
 (0)