Custom Structural Directive | Directives | Angular 12+

preview_player
Показать описание
In this lecture you will learn how to create a custom structural directive which can manipulate the DOM by adding or removing elements from the DOM. To understand this, we are going to create a custom structural directive similar to ngIf built-in directive of angular.

We will create an appIf directive which will add or remove element from the DOM based on a given condition assigned to it. If the condition returns true, appIf will add the element on which we have used it to the DOM. Otherwise it will remove that element from the DOM.

Let's create the custom structural directive in this lecture.
Рекомендации по теме
Комментарии
Автор

Thank you so much for this course! Made my internship much more easier to adjust to. Referred here many times!

reubenlaji
Автор

Amazing course, I've learned a lot with these videos.

SanMati
Автор

@input decorator will use setter method? This setter method in which phase will be called?

narenk
Автор

Why we can create custom structural directive when we have already *ngIf ??

fingersfingers-cj