angular-component

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

1|Updated Oct 12, 2022
One-click install
npx skills add https://github.com/plastikaweb/plastikspace --skill angular-component-plastikaweb
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: angular-component
Source: https://github.com/plastikaweb/plastikspace/tree/main/.agents/skills/angular-component
Command: npx skills add https://github.com/plastikaweb/plastikspace --skill angular-component-plastikaweb

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill guides developers in building modern Angular v20+ standalone components that leverage signal-based inputs/outputs, OnPush change detection, host bindings, content projection, and lifecycle hooks, ensuring consistency and maintainability across UI components.

Core Features & Use Cases

  • Standalone by default: Create components that are self-contained without NgModule declarations, adhering to Angular v20+ best practices.
  • Signals-based inputs/outputs: Use signal-driven data flow for inputs and outputs to enable reactive, type-safe bindings.
  • Host bindings and template bindings: Implement dynamic classes, styles, attributes, and events via the host option.
  • Content projection patterns: Compose components with projection slots for flexible composition.
  • Lifecycle and patterns: Include initialization and cleanup hooks and modern patterns like OnInit and OnDestroy.

Quick Start

Create a minimal Angular 20+ standalone component that exposes a signal-based input and output, uses a host binding, and demonstrates content projection in its template.

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 standalone components with signal-based inputs and outputs?

To build Angular standalone components with signals, define self-contained components without NgModule declarations and use signal-driven data flow for inputs and outputs to enable reactive, type-safe bindings. This approach adheres to modern Angular v20+ best practices.

What is the best way to implement OnPush change detection in Angular v20+ components?

The best way to implement OnPush change detection in Angular v20+ is by combining standalone components with signal-based inputs and outputs. This reactive data flow ensures the OnPush strategy works efficiently without manual change detection triggers.

How do I use content projection and host bindings in modern Angular components?

You use content projection by defining projection slots in your component template for flexible composition, and implement host bindings via the host option to dynamically manage classes, styles, attributes, and events directly on the host element.

Can I use lifecycle hooks like OnInit and OnDestroy with signal-based Angular components?

Yes, you can use lifecycle hooks like OnInit and OnDestroy with signal-based Angular components. The pattern includes initialization and cleanup hooks alongside signal-driven inputs to manage component state and resource disposal effectively.

Does this approach to Angular components require NgModule declarations?

No, this approach does not require NgModule declarations. It focuses on creating standalone Angular v20+ components that are self-contained, ensuring consistency and maintainability across UI components without relying on NgModules.