What problem does it solve?
Angular directives can become hard to compose, reuse, and modernize across large applications; this Skill consolidates current API changes, best practices, and composition patterns so developers can author predictable, maintainable directives that align with Angular 21 features.
Core Features & Use Cases
- Directive composition: Guidance on using hostDirectives to compose behaviors across components and directives for reusable UI patterns.
- Reactive inputs and signals: Patterns for using input() signals inside directives and integrating reactive state with directive logic.
- Standalone and migration: Advice for migrating classic directives to standalone directives and updating structural directives to new control-flow syntax.
- Template and DOM control: Practical usage of TemplateRef, ViewContainerRef, HostBinding, and HostListener for structural and attribute directives.
- Use Case: Refactor a legacy highlight and click tracking directive set to use hostDirectives, signals for inputs, and standalone configuration so they are composable and tree-shakable in an Angular 21 app.
Quick Start
Review my directive implementation and recommend how to refactor it for hostDirectives, signals-based inputs, and standalone usage.