What problem does it solve?
Angular directives enable encapsulating reusable DOM behavior to avoid duplicating UI logic across components. This skill provides patterns for attribute directives, structural directives for portals/overlays, and host directives to compose behaviors across components, improving consistency and reducing boilerplate.
Core Features & Use Cases
- Attribute directives to modify element appearance and behavior
- Structural directives for portals, overlays, and dynamic DOM insertion
- Host directives that compose multiple behaviors into reusable components
- Pattern-driven guidance with references to directive-patterns.md for advanced scenarios
Quick Start
Use the angular-directives skill to create a new directive, apply it to a component, and progressively compose more complex directives to achieve reusable UI behaviors. For example, develop an attribute directive to highlight an element, then a structural directive to render content in a portal, and finally a host directive to combine both behaviors across components.