前端开发

angular-component

analogjs/angular-skills

DEPRECATED - this skill is unmaintained. Use the official Angular skills at https://github.com/angular/skills instead. Create modern Angular standalone components following v20+ best practices. Use for building UI components with signal-based inputs/outputs, OnPush change detection, host bindings, content projection, and lifecycle hooks. Triggers on component creation, refactoring class-based inputs to signals, adding host bindings, or implementing accessible interactive components.

  • 1.2万 次安装
  • 588 星标
  • 收录于

安装命令

npx skills add https://github.com/analogjs/angular-skills --skill angular-component

要点

Build standalone Angular v20+ components with signals, OnPush detection, and modern control flow.

  • Signal-based inputs and outputs replace traditional @Input and @Output decorators, with support for required inputs, defaults, transforms, and computed values
  • Host bindings configured via the host object enable dynamic class/style/attribute binding and event listeners without decorator syntax
  • Native control flow (@if, @for, @switch) replaces structural directives; direct class and style bindings replace ngClass and ngStyle
  • Content projection with named slots, lifecycle hooks via afterRender/afterNextRender, and mandatory WCAG AA accessibility compliance with ARIA attributes and keyboard support

SKILL.md

Angular Component

⚠️ Deprecated. This skill is no longer maintained, and its guidance has been removed rather than left to go stale. The Angular team now publishes official skills at angular/skills — install those instead:

npx skills add https://github.com/angular/skills

To remove these: npx skills remove analogjs/angular-skills

The previous contents of this skill remain available in this repository's git history.