Files
gh-jamesscalescode-claude-d…/commands/ng-component.md
2025-11-29 18:49:53 +08:00

678 B

description, argument-hint
description argument-hint
Generate a new Angular component
path/component-name

Generate a new Angular component at $1:

  1. Create the component using Angular CLI:

    ng generate component $1
    
  2. The component will include:

    • TypeScript component class
    • HTML template
    • CSS/SCSS stylesheet
    • Spec file for testing
  3. Provide guidance on:

    • How to use the component in templates
    • Common component patterns (inputs, outputs, lifecycle hooks)
    • Where to import it if needed

If the user didn't specify a path, ask them where they want to create it (e.g., features/user/components/user-profile or shared/components/button).