diff --git a/public/docs/_examples/structural-directives/ts/src/app/app.component.html b/public/docs/_examples/structural-directives/ts/src/app/app.component.html
index 309d2bb5f7..49c4928aad 100644
--- a/public/docs/_examples/structural-directives/ts/src/app/app.component.html
+++ b/public/docs/_examples/structural-directives/ts/src/app/app.component.html
@@ -48,11 +48,11 @@
NgIf
NgIf with template
-<template> element
+<ng-template> element
-
+
{{hero.name}}
-
+
template attribute
@@ -140,9 +140,9 @@ NgFor
<template ngFor let-hero [ngForOf]="heroes" let-i="index" let-odd="odd" [ngForTrackBy]="trackById">
-
+
({{i}}) {{hero.name}}
-
+
@@ -179,21 +179,21 @@ NgSwitch with template attribute
-NgSwitch with <template>
+NgSwitch with <ng-template>
-
+
-
-
+
+
-
-
+
+
-
-
+
+
-
+
@@ -202,9 +202,9 @@ NgSwitch with <template>
<template>
Hip!
-
+
Hip!
-
+
Hooray!
@@ -242,9 +242,9 @@ UnlessDirective with template
(A) <p template="myUnless condition" class="code unless">
-
+
(A) <template [myUnless]="condition">
-
+
diff --git a/public/docs/_examples/template-syntax/ts/src/app/app.component.html b/public/docs/_examples/template-syntax/ts/src/app/app.component.html
index e58460bf89..760fa3a367 100644
--- a/public/docs/_examples/template-syntax/ts/src/app/app.component.html
+++ b/public/docs/_examples/template-syntax/ts/src/app/app.component.html
@@ -544,13 +544,13 @@ [ngStyle] binding to currentStyles - CSS property names
-Add {{currentHero.name}} with template
+Add {{currentHero.name}} with template
Hero Detail removed from DOM (via template) because isActive is false
-
+
-
+
diff --git a/public/docs/ts/latest/guide/structural-directives.jade b/public/docs/ts/latest/guide/structural-directives.jade
index 7b38bf765b..60be473458 100644
--- a/public/docs/ts/latest/guide/structural-directives.jade
+++ b/public/docs/ts/latest/guide/structural-directives.jade
@@ -23,10 +23,11 @@ style.
* [Inside the *NgSwitch* directives](#ngSwitch)
* [Prefer the (*) prefix](#prefer-asterisk)
- * [The <template> element](#template)
+ * [The <ng-template> element](#template)
* [Group sibling elements with <ng-container>](#ng-container)
* [Write a structural directive](#unless)
+
Try the .
a#definition
@@ -52,7 +53,7 @@ a#definition
You'll learn in this guide that the [asterisk (*) is a convenience notation](#asterisk)
and the string is a [_microsyntax_](#microsyntax) rather than the usual
[template expression](template-syntax.html#template-expressions).
- Angular desugars this notation into a marked-up `` that surrounds the
+ Angular desugars this notation into a marked-up `` that surrounds the
host element and its descendents.
Each structural directive does something different with that template.
@@ -116,7 +117,7 @@ figure.image-display
:marked
The top paragraph is in the DOM. The bottom, disused paragraph is not;
- in its place is a comment about "template bindings" (more about that [later](#asterisk)).
+ in its place is a comment about "bindings" (more about that [later](#asterisk)).
When the condition is false, `NgIf` removes its host element from the DOM,
detaches it from DOM events (the attachments that it made),
@@ -179,13 +180,13 @@ a#asterisk
+makeExcerpt('src/app/app.component.html', 'ngif-template-attr', '')
:marked
- Then it translates the template _attribute_ into a template _element_, wrapped around the host element, like this.
+ Then it translates the template _attribute_ into a `` _element_, wrapped around the host element, like this.
+makeExcerpt('src/app/app.component.html', 'ngif-template', '')
:marked
- * The `*ngIf` directive moved to the `` element where it became a property binding,`[ngIf]`.
- * The rest of the ``, including its class attribute, moved inside the `
` element.
+ * The `*ngIf` directive moved to the `` element where it became a property binding,`[ngIf]`.
+ * The rest of the ``, including its class attribute, moved inside the `
` element.
None of these forms are actually rendered.
Only the finished product ends up in the DOM.
@@ -194,8 +195,8 @@ figure.image-display
img(src='https://github.com/resources/images/devguide/structural-directives/hero-div-in-dom.png' alt="hero div in DOM")
:marked
- Angular consumed the `` content during its actual rendering and
- replaced the `` with a diagnostic comment.
+ Angular consumed the `` content during its actual rendering and
+ replaced the `` with a diagnostic comment.
The [`NgFor`](#ngFor) and [`NgSwitch...`](#ngSwitch) directives follow the same pattern.
@@ -205,7 +206,7 @@ a#ngFor
## Inside _*ngFor_
Angular transforms the `*ngFor` in similar fashion from asterisk (*) syntax through
- template _attribute_ to template _element_.
+ template _attribute_ to `` _element_.
Here's a full-featured application of `NgFor`, written all three ways:
@@ -221,7 +222,7 @@ a#ngFor
.alert.is-helpful
:marked
Everything _outside_ the `ngFor` string stays with the host element
- (the ``) as it moves inside the `
`.
+ (the ``) as it moves inside the `
`.
In this example, the `[ngClass]="odd"` stays on the ``.
a#microsyntax
@@ -229,7 +230,7 @@ a#microsyntax
### Microsyntax
The Angular microsyntax lets you configure a directive in a compact, friendly string.
- The microsyntax parser translates that string into attributes on the `
`:
+ The microsyntax parser translates that string into attributes on the ``:
* The `let` keyword declares a [_template input variable_](#template-input-variable)
that you reference within the template. The input variables in this example are `hero`, `i`, and `odd`.
@@ -337,7 +338,7 @@ a#ngSwitch
+makeExcerpt('src/app/app.component.html', 'ngswitch-template-attr', '')
:marked
- That, in turn, can be desugared into the `` element form.
+ That, in turn, can be desugared into the `` element form.
+makeExcerpt('src/app/app.component.html', 'ngswitch-template', '')
@@ -350,20 +351,19 @@ a#prefer-asterisk
to host the directive.
While there's rarely a good reason to apply a structural directive in template _attribute_ or _element_ form,
- it's still important to know that Angular creates a `` and to understand how it works.
- You'll refer to the `` when you [write your own structural directive](#unless).
+ it's still important to know that Angular creates a `` and to understand how it works.
+ You'll refer to the `` when you [write your own structural directive](#unless).
a#template
.l-main-section
:marked
- ## The *<template>*
+ ## The *<ng-template>*
- The HTML 5 <template>
- is a formula for rendering HTML.
+ The <ng-template> is an Angular element for rendering HTML.
It is never displayed directly.
- In fact, before rendering the view, Angular _replaces_ the `` and its contents with a comment.
+ In fact, before rendering the view, Angular _replaces_ the `` and its contents with a comment.
- If there is no structural directive and you merely wrap some elements in a ``,
+ If there is no structural directive and you merely wrap some elements in a ``,
those elements disappear.
That's the fate of the middle "Hip!" in the phrase "Hip! Hip! Hooray!".
@@ -376,7 +376,7 @@ figure.image-display
img(src='https://github.com/resources/images/devguide/structural-directives/template-rendering.png' width="350" alt="template tag rendering")
:marked
- A structural directive puts a `` to work
+ A structural directive puts a `` to work
as you'll see when you [write your own structural directive](#unless).
a#ngcontainer
@@ -526,11 +526,11 @@ a#unless
A simple structural directive like this one creates an
[_embedded view_](../api/core/index/EmbeddedViewRef-class.html "API: EmbeddedViewRef")
- from the Angular-generated `` and inserts that view in a
+ from the Angular-generated `` and inserts that view in a
[_view container_](../api/core/index/ViewContainerRef-class.html "API: ViewContainerRef")
adjacent to the directive's original `` host element.
- You'll acquire the `` contents with a
+ You'll acquire the `` contents with a
[`TemplateRef`](../api/core/index/TemplateRef-class.html "API: TemplateRef")
and access the _view container_ through a
[`ViewContainerRef`](../api/core/index/ViewContainerRef-class.html "API: ViewContainerRef").
@@ -614,7 +614,7 @@ a#summary
* that structural directives manipulate HTML layout.
* to use [``](#ngcontainer) as a grouping element when there is no suitable host element.
- * that the Angular desugars [asterisk (*) syntax](#asterisk) into a ``.
+ * that the Angular desugars [asterisk (*) syntax](#asterisk) into a ``.
* how that works for the `NgIf`, `NgFor` and `NgSwitch` built-in directives.
- * about the [_microsyntax_](#microsyntax) that expands into a [``](#template).
+ * about the [_microsyntax_](#microsyntax) that expands into a [``](#template).
* to write a [custom structural directive](#unless), `UnlessDirective`.
diff --git a/public/docs/ts/latest/guide/template-syntax.jade b/public/docs/ts/latest/guide/template-syntax.jade
index 712e1b23bb..bbde23100a 100644
--- a/public/docs/ts/latest/guide/template-syntax.jade
+++ b/public/docs/ts/latest/guide/template-syntax.jade
@@ -1402,7 +1402,7 @@ a#microsyntax
> *Take each hero in the `heroes` array, store it in the local `hero` looping variable, and
make it available to the templated HTML for each iteration.*
- Angular translates this instruction into a `` around the host element,
+ Angular translates this instruction into a `` around the host element,
then uses this template repeatedly to create a new set of elements and bindings for each `hero`
in the list.
diff --git a/public/resources/images/devguide/structural-directives/element-not-in-dom.png b/public/resources/images/devguide/structural-directives/element-not-in-dom.png
index 23ad652bb4..5298935c4a 100644
Binary files a/public/resources/images/devguide/structural-directives/element-not-in-dom.png and b/public/resources/images/devguide/structural-directives/element-not-in-dom.png differ