VS Code extension to create Angular entities and manage component files quickly.
Commands
1. Create Angular Entity
Shortcut: Ctrl+Shift+A C (Windows/Linux) or Cmd+Shift+A C (Mac)
Supported entities:
- Component
- Service
- Directive
- Pipe
- Environment
- Guard
- Interceptor
- Module
Flow:
- Select entity type
- Select destination folder from a searchable project folder picker
- Enter name (kebab-case)
- It could be by creating other folders like "folder/my-name" or just creating the component like "my-"
- Choose Flat or In subfolder (for Component and Module)
Notes:
- The folder picker hides base folders:
src,src/app, andpublic. - If launched from Explorer on a folder, that folder is used directly.
- Uses
ng generatewhenangular.jsonis available. - Falls back to file templates if no Angular project is detected.
- Opens the created file automatically when done.
2. Manage Component Files
Shortcut: Ctrl+Shift+A M (Windows/Linux) or Cmd+Shift+A M (Mac)
From a TypeScript file, lets you:
- Create/Link HTML
- Create/Link CSS
- Create Tests (spec)
What it does:
- Extracts inline template/styles to separate files when present
- Links
templateUrlandstyleUrlin the component decorator - Generates a basic
.spec.tsfile with the correct class name
Explorer Context Menu
- Folder:
Angular: Create Entity here… .component.tsfile:Angular: Manage Component Files…