angular-directives

Create custom Angular directives for DOM manipulation and behavior composition.

Updated Nov 20, 2025
One-click install
npx skills add https://github.com/bluehands/Carbon-Aware-Scheduler --skill angular-directives-bluehands
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: angular-directives
Source: https://github.com/bluehands/Carbon-Aware-Scheduler/tree/main/source/frontend/.agents/skills/angular-directives
Command: npx skills add https://github.com/bluehands/Carbon-Aware-Scheduler --skill angular-directives-bluehands

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill provides reusable custom directives to extend Angular components' functionality, enabling cleaner code and more dynamic user interfaces without boilerplate.

Core Features & Use Cases

  • DOM Manipulation: Create attribute directives to modify element styles, attributes, or behavior directly.
  • Behavior Extension: Implement structural directives for advanced DOM manipulation like portals or conditional rendering logic.
  • Composition: Utilize host directives to compose multiple behaviors onto components or other directives.
  • Use Case: Build a TooltipDirective that appears on hover, or a ClickOutsideDirective to close a menu when clicking anywhere else on the page.

Quick Start

Create a new attribute directive named appHighlight that changes the background color of an element to a specified color.

Frequently Asked Questions about angular-directives

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create custom Angular directives for DOM manipulation?

Custom Angular directives enable DOM manipulation by utilizing attribute directives to modify element styles or behavior directly. You can declaratively implement these modifications using Angular's input, output, effect, and host binding APIs.

What is the best way to compose multiple behaviors onto Angular components?

Composing multiple behaviors onto Angular components is best achieved using host directives. This approach allows you to reuse and compose behavior extensions onto components or other directives without writing repetitive boilerplate code.

How do I implement structural directives for advanced DOM control in Angular?

Structural directives implement advanced DOM control in Angular by managing conditional rendering logic or creating portals. They extend component behavior dynamically, manipulating the DOM structure based on application state.

Can I build a tooltip directive that appears on hover in Angular?

Yes, you can build a TooltipDirective that appears on hover in Angular. It functions as an attribute directive that directly modifies element behavior, creating dynamic user interfaces through declarative implementation.

How do I close a menu when clicking outside in Angular?

To close a menu when clicking outside in Angular, you create a ClickOutsideDirective. This attribute directive listens for external click events and manipulates the DOM to remove or hide the menu element.

Do I need specific dependencies to extend Angular UI with custom directives?

No specific external dependencies are required to extend Angular UI with custom directives. The implementation relies entirely on native Angular APIs, including inputs, outputs, effects, and host bindings for declarative behavior extension.