From 0bbf94c3d8fcaf12bc49e86e1a344f5eb7762cc1 Mon Sep 17 00:00:00 2001 From: Ward Bell Date: Tue, 11 Apr 2017 20:07:49 -0700 Subject: [PATCH] docs(cheatsheet): template -> ng-template (#3528) --- public/docs/ts/latest/guide/cheatsheet.jade | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/docs/ts/latest/guide/cheatsheet.jade b/public/docs/ts/latest/guide/cheatsheet.jade index 1e787be3e3..4cc87b28a3 100644 --- a/public/docs/ts/latest/guide/cheatsheet.jade +++ b/public/docs/ts/latest/guide/cheatsheet.jade @@ -98,7 +98,7 @@ is available to declarations of this module.

<p *myUnless="myExpression">...</p>

The * symbol turns the current element into an embedded template. Equivalent to: -<template [myUnless]="myExpression"><p>...</p></template>

+<ng-template [myUnless]="myExpression"><p>...</p></ng-template>

<p>Card No.: {{cardNumber | myCardNumberFormatter}}</p> @@ -135,7 +135,7 @@ is available to declarations of this module.

Turns the li element and its contents into a template, and uses that to instantiate a view for each item in list.

-<div [ngSwitch]="conditionExpression">
  <template [ngSwitchCase]="case1Exp">...</template>
  <template ngSwitchCase="case2LiteralString">...</template>
  <template ngSwitchDefault>...</template>
</div>
+<div [ngSwitch]="conditionExpression">
  <ng-template [ngSwitchCase]="case1Exp">...</ng-template>
  <ng-template ngSwitchCase="case2LiteralString">...</ng-template>
  <ng-template ngSwitchDefault>...</ng-template>
</div>

Conditionally swaps the contents of the div by selecting one of the embedded templates based on the current value of conditionExpression.