Angular's New Template Syntax: Control Flow

Deborah Kurata
Deborah Kurata
3.3 هزار بار بازدید - 3 ماه پیش - Starting in Angular version 17,
Starting in Angular version 17, we have the option of using new techniques for building our templates. This new block template syntax replaces the NgIf, NgFor, and NgSwitch directives with built-in control flow blocks.

Why do we need a new template syntax? In this video, we first examine the new if and for control flow blocks. Then we outline the benefits and answer the "why?" question.

Links
Code: https://github.com/DeborahK/Angular-C...

Content
00:00 Angular new template syntax: control flow
00:32 Sample application in action
01:00 Conditionals (@if block)
01:56 Why the @ symbol for control flow blocks?
02:18 Conditionals (@else block)
02:48 Conditionals (@else if block)
03:30 Loops (@for block)
04:43 Loops (@empty block)
05:13 Removing the imported directives from the component
06:05 Why do we need a new template syntax?
07:15 Wrap up

▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
😊About Me
Hey! I'm Deborah Kurata
I'm a software developer and YouTube content creator.  I speak at conferences such as VS Live 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+) over the past 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).

Contact me on Twitter: Twitter: DeborahKurata
Find my Pluralsight courses: https://www.pluralsight.com/profile/a...
Access my freeCodeCamp articles: https://www.freecodecamp.org/news/aut...
View my YouTube content: @deborah_kurata

▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
#angular #angularcontrolflow #angular17controlflow #controlflowsyntax #newsyntaxforcontrolflowintemplates #controlflowangular #controlflow #angular17controlflows #howtousenewcontrolflowsinangular17 #angularcontrolflowexplanation #newdeclarativecontrolflowangular #angular 17newcontrolflow #whatisangularcontrolflow #angular@ifcontrolflow #controlflowangularv17 #builtinangularflowtemplate #angular@forcontrolflow
3 ماه پیش در تاریخ 1403/01/14 منتشر شده است.
3,328 بـار بازدید شده
... بیشتر