Structural Directives

In this lesson, we'll learn about how to use directives to conditionally render elements.

There’s one final touch we’ll add to the application. Below the button, the text Reversed Text appears regardless if there’s text to reverse or not. It would be ideal if we could hide the element until there’s something to reverse. We can do just that using directives.

Directives

A directive is a special attribute used to change the appearance or behavior of an element. There are two types of directives you’ll commonly use in your template. ...