简体   繁体   中英

Is there any shortcut in VS Code for navigating to HTML of angular component or vice versa?

Is there any keyboard shortcut available for VS Code for navigating from angular component.ts file to its component.html file or component.html file to component.ts file?

or is there any extension available for it?

It very difficult to open component's HTML file or vice versa while working in ZEN mode or full screen mode.

I know we can use ctrl + shift + p to open command palate and we can open desired file, but I'm looking for any keyboard shortcut if available.

Yes. This extension is what you are looking for: angular2-switcher

To take your example, to switch from component.ts to the corresponding component.html, use shortcut:

alt+o

Yes, VS code gives you simple shortcut to navigate in opened files by

ctrl + tab

this will open the next file opened, and if you want to navigate to the previous file again in case of multiple files open, just use

ctrl + shift + tab

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM