Initial commit

This commit is contained in:
Zhongwei Li
2025-11-29 18:49:53 +08:00
commit 7ffb60d52c
8 changed files with 305 additions and 0 deletions

24
commands/ng-component.md Normal file
View File

@@ -0,0 +1,24 @@
---
description: Generate a new Angular component
argument-hint: [path/component-name]
---
Generate a new Angular component at $1:
1. Create the component using Angular CLI:
```bash
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`).