docs: document the use of this in template expression syntax (#61250)

As of Angular 19, `this` should consistently reference the given
class property.

See: https://github.com/angular/angular/pull/55183
Co-authored-by: Jeremy Elbourn <jelbourn@google.com>
Co-authored-by: Matthieu Riegler <kyro38@gmail.com>

PR Close #61250
This commit is contained in:
Jan Martin 2025-05-09 11:51:33 -07:00 committed by Alex Rickabaugh
parent 8e78b4e438
commit 4108efaee6

View file

@ -98,7 +98,7 @@ Angular expressions additionally also support the following non-standard operato
Angular expressions are evaluated within the context of the component class as well as any relevant [template variables](/guide/templates/variables), locals, and globals.
When referring to class members, `this` is always implied.
When referring to component class members, `this` is always implied. However, if a template declares a [template variables](guide/templates/variables) with the same name as a member, the variable shadows that member. You can unambiguously reference such a class member by explicitly using `this.`. This can be useful when creating an `@let` declaration that shadows a class member, e.g. for signal narrowing purposes.
## Declarations