Angular's New Template Syntax: Control Flow

Veröffentlicht am: 02 April 2024
auf dem Kanal: Deborah Kurata
3,834
339

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:   / 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


Auf dieser Seite können Sie das Online-Video Angular's New Template Syntax: Control Flow mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer Deborah Kurata 02 April 2024 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 3,834 Mal angesehen und es wurde von 339 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!