Have you ever wondered what's that asterisk prefix (*) for *ngIf and *ngFor? That's called a structural directive. In this video, I'll show you what it is, when you would want it, and how it works.
📚 Read the article: https://www.lucaspaganini.com/academy...
🚨 Subscribe to the newsletter: https://www.lucaspaganini.com/newsletter
📧 Email: [email protected]
🐦 Twitter: / lucaspaganini
📸 Instagram: / lucaspaganini
----------
CHAPTERS
0:00 Introduction
0:21 Templates are the Structure
0:51 NgIf Internals
1:16 Synthetic sugar
1:41 Only one Allowed
2:06 Structural Directive Microsyntax
2:52 Variable Declarations
4:26 Key Expressions
5:38 Local Bindings
5:58 Conclusion
REFERENCES
1. Structural directives documentation - (Angular docs): https://angular.io/guide/structural-d...
2. NgIfDirective implementation - (GitHub): https://github.com/angular/angular/bl...