From 1939613f71be3dea28faee7738b9764a407c5d88 Mon Sep 17 00:00:00 2001 From: ali Date: Fri, 13 Aug 2021 08:02:55 +0430 Subject: [PATCH] docs: add example for template local variable (#43137) PR Close #43137 --- aio/content/guide/template-reference-variables.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/aio/content/guide/template-reference-variables.md b/aio/content/guide/template-reference-variables.md index ac2ca5855e1..6421d467e3a 100644 --- a/aio/content/guide/template-reference-variables.md +++ b/aio/content/guide/template-reference-variables.md @@ -162,6 +162,12 @@ You declare a template input variable using the `let` keyword as in `let hero`. There are several such variables in this example: `hero`, `i`, and `odd`. +```html + +
{{i}}:{{hero.name}}
+
+``` + The variable's scope is limited to a single instance of the repeated template. Use the same variable name again in the definition of other structural directives.