Angular 2 (Angular 4) - Structural Directives

preview_player
Показать описание
Angular 2 (Angular 4) - Structural Directives

This video was meant to be about dynamic forms, however I changed it last minute as I thought that learning the built in Structural Directives first would be important before I start build a dynamic form.

There are 3 built in Structural Directives in Angular 2.

- *ngIf
- *ngFor
- ngSwitch

Along with the explanation of what these 3 can do for your HTML template files, I explain what the asterisks means for ngIf and ngFor and how behind the scenes the Angular 2 framework is using a template element tag to render the content inside of it.

We show that components inside of any of the directives specified above get destroyed an re-initialised, every time it is toggle to be hidden. This is something a lot of developers make mistakes on. I show you how you can hide components without destroying it by using simple attribute binding.

There is no github repo for this video. It's pretty simple so just follow along.

Watch all my other videos in this series:-

Рекомендации по теме
Комментарии
Автор

These videos are great. Thanks for putting in the time to make them.

Pierriot