HoangNguyen0403

Directives & Pipes

Composition patterns using HostDirectives and Pure Pipes.

HoangNguyen0403 501 148 Updated 4mo ago

Resources

1
GitHub

Install

npx skillscat add hoangnguyen0403/agent-skills-standard/directives-pipes

Install via the SkillsCat registry.

SKILL.md

Directives & Pipes

Priority: P2 (MEDIUM)

Principles

  • Composition: Use hostDirectives to compose behaviors onto components/directives without inheritance.
  • Pure Pipes: Pipes must be pure: true (default). They cache results based on input reference.
  • Directive Logic: Encapsulate reusable DOM manipulation or behavioral logic in Directives (e.g., appFocusTrap, appTooltip).

Guidelines

  • Signal Inputs: Directives also support signal inputs.
  • Standalone: All Pipes and Directives must be standalone.

References

Categories