AngularSwitcher
Jump instantly between an Angular component's template, stylesheet, TypeScript, and declaring NgModule file — no more hunting through the file explorer.
Features
AngularSwitcher adds keyboard shortcuts to quickly switch between the related files of an Angular component, directive, or service:
- Switch to Template — opens the
.html/.htm file
- Switch to Style — opens the
.css, .scss, .sass, or .less file
- Switch to TypeScript — opens the
.ts file
- Switch to Module — finds and opens the
NgModule that declares the current component
Switching works from any related file — for example, triggering "Switch to Template" from a .spec.ts or .ts file opens the matching .html file for that component.
The "Switch to Module" command reads the current component's class name and searches the workspace for the .module.ts file that lists it in its declarations array. If the component is standalone, you'll get a notification instead, since standalone components have no NgModule.
Keyboard Shortcuts
| Command |
Windows / Linux |
macOS |
| Switch to Template |
Alt+O |
Shift+Alt+O |
| Switch to Style |
Alt+I |
Shift+Alt+I |
| Switch to TypeScript |
Alt+U |
Shift+Alt+U |
| Switch to Module |
Alt+Y |
Shift+Alt+Y |
All commands are also available from the Command Palette (Ctrl+Shift+P / Cmd+Shift+P) by searching for "Switch to".
Requirements
No dependencies or configuration needed — just open a folder containing Angular files and start switching.
Extension Settings
This extension does not currently contribute any settings.
Known Issues
- "Switch to Module" only matches components referenced by class name in a module's
declarations array; it does not resolve components registered through other patterns.
Release Notes
See the Changelog for details on each release.
Enjoy!