DIRECTIVE - fluorescent Neon tube Sign on brickwork - Front view - 3D rendered royalty free stock picture. Can be used for online banner ads and direct mailers.

Angular Directives

Angular directives allow the creation of DOM elements. We can also change the structure and behavior of the elements. There are three types of Angular directives…

  • Components – directives that have templates.
  • Attribute – directives that change appearance and behavior or elements.
  • Structural – directives that change the DOM layout.

The difference between a component and a directive is the template. Components have a template. Attribute and structural directives do not. Angular does come with built-in directives such as *ngFor and *ngIf, which are structural, and NgStyle and NgModel, which are attribute.

Happy Coding!

Clay Hess

Share this post

Share on facebook
Share on google
Share on twitter
Share on linkedin
Share on pinterest
Share on print
Share on email
Skip to content