Рет қаралды 4,648
With @let, new in Angular v18.1, we can declare and assign local variables in our template. That's right, I said template!
In this video, we'll look at the @let declaration syntax, walk through some common scenarios, and evaluate some early best practices for using @let.
Links
Code: stackblitz.com/~/edit/let-dec...
KZfaq video: "Angular's New Template Syntax: Control Flow": • Angular's New Template...
Pre-release Article: itnext.io/template-local-vari...
Pre-release Article: netbasal.com/exploring-angula...
Content
00:00 @let declaration
00:30 @let syntax
01:09 Sample application
01:34 Minimize duplicate expressions
03:00 Pipe
03:36 Type narrowing of signals
05:03 Variable scope
06:07 Style attributes
07:59 Calculations?
09:13 Calling a method?
10:06 Best practices
11:34 Wrap up
▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
😊About Me
Hey! I'm Deborah Kurata
I'm a software developer and KZfaq content creator. I speak at conferences such as VSLive and ng-conf. I write articles for freeCodeCamp. And I'm a Pluralsight author with courses in the top 10 most popular (out of 7,000+) for over 5 years. For my work in support of software developers, I've been recognized with the Microsoft Most Valuable Professional (MVP) award, and I'm a Google Developer Expert (GDE).
View my KZfaq content: / @deborah_kurata
Contact me on Twitter: / deborahkurata
Find my Pluralsight courses: www.pluralsight.com/profile/a...
Access my freeCodeCamp articles: www.freecodecamp.org/news/aut...
▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
#angular
#angulartutorials
#angulartutorial
#angulardevelopers
#angularbestpractices
#angular18newfeatures
#angular18newfeature
#angular18features
#@let
#angularletdeclaration
#@letinangular
#@letinangular18.1
#angularnewfeatures
#featuresinangular18
#declarevariableintemplate
#angular@let
#angularlatestfeatures
#whatis@letinangular
#angularfeaturesandupdates
#angular18featuresandupdates
#angular@letsyntax