angular-component

Generate Angular standalone components with signal-based inputs and outputs.

2|Updated Jan 5, 2024
One-click install
npx skills add https://github.com/wilfriedago/dotfiles --skill angular-component-wilfriedago
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: angular-component
Source: https://github.com/wilfriedago/dotfiles/tree/main/agents/skills/angular-component
Command: npx skills add https://github.com/wilfriedago/dotfiles --skill angular-component-wilfriedago

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill streamlines the creation of modern, efficient Angular standalone components, adhering to the latest best practices for enhanced performance and maintainability.

Core Features & Use Cases

  • Standalone Components: Generates components that are standalone by default, simplifying module management.
  • Signal-Based Inputs/Outputs: Utilizes Angular signals for reactive inputs and outputs, improving change detection.
  • OnPush Change Detection: Implements ChangeDetectionStrategy.OnPush for optimized rendering.
  • Host Bindings & Content Projection: Provides clear examples for advanced template manipulation and content composition.
  • Accessibility: Enforces accessibility standards (WCAG AA, ARIA attributes, keyboard navigation).
  • Use Case: Quickly scaffold a new interactive UI element like a custom dropdown or a data table, ensuring it's performant, accessible, and follows current Angular patterns.

Quick Start

Use the angular-component skill to generate a new standalone Angular component named 'user-profile-card' with signal inputs for 'name' and 'email'.

Frequently Asked Questions about angular-component

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

FAQPage Schema
How do I build Angular components using signals for inputs and outputs?

Build Angular components using signals by generating standalone components with signal-based inputs and outputs, OnPush change detection, and host bindings. This approach streamlines reactive state management and optimizes rendering performance in modern Angular applications.

Can I refactor class-based inputs to signals in my existing Angular components?

Refactor class-based inputs to signals in Angular components to improve change detection efficiency. This modernization process transitions existing properties to signal-based inputs while maintaining component functionality and adhering to v20+ best practices.

What is the best way to create accessible interactive UI components in Angular?

Create accessible interactive UI components in Angular by scaffolding standalone components with built-in WCAG AA compliance, ARIA attributes, and keyboard navigation support. This ensures custom dropdowns or data tables meet modern accessibility standards.

Does this Angular component generator support content projection and host bindings?

This Angular component generator supports content projection and host bindings for advanced template manipulation and content composition. It provides clear examples for these features while implementing OnPush change detection strategy.

Why use OnPush change detection strategy when building standalone Angular components?

Use OnPush change detection strategy when building standalone Angular components to optimize rendering performance. Combined with signal-based inputs and outputs, OnPush ensures components only re-render when their specific inputs change, improving overall application efficiency.