MockReal Logo
Home
BlogPricing
For Employers β†’
  1. Home
  2. Questions
  3. What are Directives?

What are Directives?

Technicalsenior full stack .net and angularSenior Full Stack .NET DeveloperFull Stack DeveloperFrontend DeveloperSoftware Engineer

Directives in Angular are special markers on a DOM element that extend HTML with new behavior. They can be used to create custom elements or attributes, allowing for reusable components and enhanced functionality.

There are three types of directives: component directives, which are essentially components, structural directives that change the DOM layout, like *ngIf or *ngFor, and attribute directives that change the appearance or behavior of an element. Understanding these allows for more modular and maintainable code.

More Questions

  • Angular Lifecycle Hooks?
  • Angular vs AngularJS?
  • Country-State Dropdown?
  • Input vs Output Decorators?
  • ViewChild vs ViewChildren?
  • What are Components and Modules?
  • What are Pipes?
  • What is Data Binding in Angular?
  • What is lazy loading in angular?
  • Authentication vs Authorization?
MockReal Logo

Spoken interview practice for technical professionals

Product

  • Pricing
  • Questions
  • Positions
  • Resumes
  • For Employers β†’

Company

  • Careers
  • About Us
  • Contact
  • Blog

Legal

  • Privacy Policy
  • Terms of Service
  • Cookie Policy

Β© 2025 MockReal. Spoken interview practice. All rights reserved.