Angular: New Local Template Variables with the @let Syntax

Опубликовано: 22 Февраль 2026
на канале: Igor Sedov
1,795
89

Angular now supports the local template variables in component templates. The new @let keyword allows us to create variables in templates using new simple syntax. In this video, I explain how the new Angular feature works in a simple, easy-to-understand way. I use a visual style of explanation for clearer understanding.

The new type of variables works only within the template, has access to the component and has a scope. Unlike the usual variables from programming languages, local template variables have a value based on the expression. Angular automatically tracks dependencies and updates the value depending on the change in the value of the associated variables. In some ways, this is similar to how Signals works.

Timestamps
0:00 Syntax (@let declaration)
0:15 Variable Expression
1:10 Variables in Expressions
1:43 Automatic Value Updates
2:16 Variable Chain
2:52 No Reassignment
3:08 Variable Scope

The framework is evolving🚀, with many significant and minor changes still to come.

▶️ I use visual explanation with infographics, animations, and simple code examples. I hope that you enjoy it and like and subscribe to my channel.

☕️ Donation:   / igorsedov  

Thanks to the ‪@Angular‬ Team for the valuable work.

ℹ️ Source: https://angular.dev/guide/templates/v...

Follow me on:
▪️Twitter:   / theigorsedov  
▪️LinkedIn:   / igorsedov  
▪️Instagram:   / theigorsedov  

Website: https://igorsedov.com
Email: [email protected]

#angular #angulartutorial #angularforbeginners