Angular
Fundamentals of Angular - Displaying Data

Conditional Display with ngIf

Mute
Current Time 0:00
/
Duration Time 0:00
Loaded: 0%
Progress: 0%
Stream TypeLIVE
Remaining Time -0:00
 

In this video...

You will learn a more advantageous way to conditionally display elements using the ngIf directive.

Binding to the hidden property had two drawbacks:

  1. It was confusing to bind to a property that hides where setting true means that the element was NOT visible
  2. The element remained in the DOM which is often times unnecessary

The ngIf directive solves these problems and is an extremely common directive.

Directives & Components Course

Fundamentals of Angular Directives

 

I finished! On to the next chapter