Angular Directive Generator
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.
fill the variables
This prompt has 2 variables. Pro fills them into a ready-to-paste prompt for you — no manual find-and-replace.
{description}{what_should_happen_to_the_host_element}
Unlock with Pro →when to use it
Community prompt from the open-source awesome-chatgpt-prompts library (CC0 public domain). A proven "Angular Directive Generator" starting point — swap in your own specifics and constraints. Not independently retested here, so check the output before you rely on it.
tags
codingcommunitygeneral
source
awesome-chatgpt-prompts · CC0 1.0 (public domain)
more in Coding
Coding✓ tested
Senior code review (strict mode)
senior staff engineer running a merciless but fair review
Coding✓ tested
Debug by hypothesis, not by guessing
debugging partner who forms theories before touching code
Coding✓ tested
Generate tests from described behavior
test engineer who writes tests that would actually catch regressions