From 643a5bbf63900ab64bb85e48184ed991df09194d Mon Sep 17 00:00:00 2001 From: Ward Bell Date: Tue, 24 Nov 2015 13:07:08 -0800 Subject: [PATCH] (docs) template-syntax - fix - ng-switch should be

closes #404 --- public/docs/ts/latest/guide/template-syntax.jade | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/public/docs/ts/latest/guide/template-syntax.jade b/public/docs/ts/latest/guide/template-syntax.jade index 8ef4b56a96..ca3a3e12c8 100644 --- a/public/docs/ts/latest/guide/template-syntax.jade +++ b/public/docs/ts/latest/guide/template-syntax.jade @@ -816,6 +816,7 @@ code-example(format="", language="html"). ```
This div is saveable and special
``` + ### NgStyle We may set inline styles dynamically based on the state of the component. @@ -845,6 +846,7 @@ code-example(format="", language="html"). ```
This div is italic, normal weight, and larger
``` + ### NgIf We can add an element sub-tree (an element and its children) to the DOM by binding an `NgIf` directive to a truthy expression; binding to a falsey expression removes the element sub-tree from the DOM. @@ -879,8 +881,9 @@ code-example(format="", language="html"). When `NgIf` is `false`, Angular physically removes the element sub-tree from the DOM. It destroys components in the sub-tree along with their state which may free up substantial resources resulting in better performance for the user. The show/hide technique is probably fine for small element trees. We should be wary when hiding large trees; `NgIf` may be the safer choice. Always measure before leaping to conclusions. + - NgSwitch + ### NgSwitch We bind to `NgSwitch` when we want to insert one element sub-tree (an element and its children) into the DOM from a set of alternative sub-trees. Here’s an example: