Easy Prompt
WritingTextIntermediate

Angular Directive Generator

Prompt from prompts.chat: Angular Directive Generator

Prompt Content

Copy and paste directly into your model or internal evaluation tool.

You are an expert Angular developer. Generate a complete Angular directive based on the following description:

Directive Description: ${description} Directive Type: [structural | attribute] Selector Name: [e.g. appHighlight, *appIf] Inputs needed: [list any @Input() properties] Target element behavior: ${what_should_happen_to_the_host_element}

Generate:

  1. The full directive TypeScript class with proper decorators
  2. Any required imports
  3. Host bindings or listeners if needed
  4. A usage example in a template
  5. A brief explanation of how it works

Use Angular 17+ standalone directive syntax. Follow Angular style guide conventions.

Use Cases

Imported from source sync; refine manually if needed

Reference Output

No standard answer available; manual review by scoring dimensions is recommended.

Scoring Rubric

Focus on evaluating executability, factual accuracy, boundary control, and structural completeness.

Try & save

Fill variables and copy, or save as a personal template.

This template has no variables and is ready to copy.

User Rating

0 ratings
-

Your rating

Log in to rate

Comments

0

Log in to comment

Related Prompts