From 58d20e57b536601b237b9e1f0dc5af9f2a81697d Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Tue, 21 Jun 2016 03:03:31 +0100 Subject: [PATCH] chore: update ngSwitchWhen to ngSwitchCase See https://github.com/angular/angular/commit/e1fcab7 --- .../ts/app/movie-list.component.html | 4 ++-- .../ts/app/dynamic-form-question.component.html | 4 ++-- .../ts/app/structural-directives.component.html | 4 ++-- .../template-syntax/ts/app/app.component.html | 16 ++++++++-------- .../latest/cookbook/a1-a2-quick-reference.jade | 4 ++-- public/docs/ts/latest/guide/template-syntax.jade | 10 +++++----- 6 files changed, 21 insertions(+), 21 deletions(-) diff --git a/public/docs/_examples/cb-a1-a2-quick-reference/ts/app/movie-list.component.html b/public/docs/_examples/cb-a1-a2-quick-reference/ts/app/movie-list.component.html index 91f7f416cd..9de98806d7 100644 --- a/public/docs/_examples/cb-a1-a2-quick-reference/ts/app/movie-list.component.html +++ b/public/docs/_examples/cb-a1-a2-quick-reference/ts/app/movie-list.component.html @@ -10,10 +10,10 @@ -

+

Excellent choice!

-

+

No movie, sorry!

diff --git a/public/docs/_examples/cb-dynamic-form-deprecated/ts/app/dynamic-form-question.component.html b/public/docs/_examples/cb-dynamic-form-deprecated/ts/app/dynamic-form-question.component.html index ceb2f41177..e580ee3027 100644 --- a/public/docs/_examples/cb-dynamic-form-deprecated/ts/app/dynamic-form-question.component.html +++ b/public/docs/_examples/cb-dynamic-form-deprecated/ts/app/dynamic-form-question.component.html @@ -4,10 +4,10 @@

- - diff --git a/public/docs/_examples/structural-directives/ts/app/structural-directives.component.html b/public/docs/_examples/structural-directives/ts/app/structural-directives.component.html index 3599c77271..cf19ebb137 100644 --- a/public/docs/_examples/structural-directives/ts/app/structural-directives.component.html +++ b/public/docs/_examples/structural-directives/ts/app/structural-directives.component.html @@ -9,8 +9,8 @@
- - + +
diff --git a/public/docs/_examples/template-syntax/ts/app/app.component.html b/public/docs/_examples/template-syntax/ts/app/app.component.html index dcfd423e50..fbe3527362 100644 --- a/public/docs/_examples/template-syntax/ts/app/app.component.html +++ b/public/docs/_examples/template-syntax/ts/app/app.component.html @@ -498,18 +498,18 @@ bindon-ngModel - Eenie - Meanie - Miney - Moe + Eenie + Meanie + Miney + Moe other - - - - + + + + diff --git a/public/docs/ts/latest/cookbook/a1-a2-quick-reference.jade b/public/docs/ts/latest/cookbook/a1-a2-quick-reference.jade index 8e95211b50..1e03e145d2 100644 --- a/public/docs/ts/latest/cookbook/a1-a2-quick-reference.jade +++ b/public/docs/ts/latest/cookbook/a1-a2-quick-reference.jade @@ -444,7 +444,7 @@ table(width="100%") +makeExample('cb-a1-a2-quick-reference/ts/app/movie-list.component.html', 'ngSwitch')(format="." ) :marked In Angular 2, the `ngSwitch` directive works similarly. - It displays an element whose `*ngSwitchWhen` matches the current `ngSwitch` expression value. + It displays an element whose `*ngSwitchCase` matches the current `ngSwitch` expression value. In this example, if `favoriteHero` is not set, the `ngSwitch` value is `null` and we see the `*ngSwitchDefault` paragraph, "Please enter ...". @@ -452,7 +452,7 @@ table(width="100%") If that method returns `true`, we see "Excellent choice!". If that methods returns `false`, we see "No movie, sorry!". - The (*) before `ngSwitchWhen` and `ngSwitchDefault` is required in this example. + The (*) before `ngSwitchCase` and `ngSwitchDefault` is required in this example. For more information on the ngSwitch directive see [Template Syntax](../guide/template-syntax.html#ngSwitch). :marked diff --git a/public/docs/ts/latest/guide/template-syntax.jade b/public/docs/ts/latest/guide/template-syntax.jade index 3414c3cdc0..9d4781d0da 100644 --- a/public/docs/ts/latest/guide/template-syntax.jade +++ b/public/docs/ts/latest/guide/template-syntax.jade @@ -1053,14 +1053,14 @@ block dart-no-truthy-falsey :marked Three collaborating directives are at work here: 1. `ngSwitch`: bound to an expression that returns the switch value - 1. `ngSwitchWhen`: bound to an expression returning a match value + 1. `ngSwitchCase`: bound to an expression returning a match value 1. `ngSwitchDefault`: a marker attribute on the default element .alert.is-critical :marked **Do *not*** put the asterisk (`*`) in front of `ngSwitch`. Use the property binding instead. - **Do** put the asterisk (`*`) in front of `ngSwitchWhen` and `ngSwitchDefault`. + **Do** put the asterisk (`*`) in front of `ngSwitchCase` and `ngSwitchDefault`. For more information, see [\* and <template>](#star-template). @@ -1199,16 +1199,16 @@ block remember-the-brackets :marked ### Expanding `*ngSwitch` A similar transformation applies to `*ngSwitch`. We can de-sugar the syntax ourselves. - Here's an example, first with `*ngSwitchWhen` and `*ngSwitchDefault` and then again with `