Angular Directives

Angular 259 views Nov 14, 2025 1 min read

Angular Directives

Directives in Angular are instructions that modify the DOM. They add behavior to elements, components, or attributes.

Types of Directives

  • Component Directives: Custom components (@Component).
  • Structural Directives: Change DOM layout (*ngIf, *ngFor, *ngSwitch).
  • Attribute Directives: Change appearance or behavior (ngStyle, ngClass).

Examples

Visible Content
{{ item }}

Styled Text

Some advanced sections are available for Registered Members
Share this Post
🚀 Want to Test Your Knowledge?

Take quizzes related to this topic and see where you stand!

Start Quiz Now
Back to Tutorials