Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Go to definition of an angular component's templateUrl or styleUrl #111
From @xWiiLLz on June 17, 2017 16:31
Hi, I'm not sure if this would be a feature request or just an issue in general. I've been using Webstorm for developing angular projects with typescript and I wanted to make the change to VS Code. There is one key feature that doesn't seem to be working or to be there at all in VS Code, which is the easy go-to-definition of a template file (html) or style file (css). When I'm editing a component in Webstorm, I can Ctrl + Click on the templateUrl's relative path and it opens the file right away.
In VS Code, the go-to-definition on a templateUrl gives me a "No definition found for 'component'". Is it a feature lacking, or just a bug?
Steps to Reproduce:
Copied from original issue: microsoft/vscode#28937
From @Deilan on June 18, 2017 13:42
This is a very highly request feature in Angular development indeed.
It would be great to also have an option to quickly find and open files with Angular directives/components declarations by pressing F12 while cursor staying at Angular component in html code.
To compensate the lack of F12 opening file, I have made a very simple extension extending the Typescript Definition Provider to allow 'F12' or 'Go to Definition' opening template and style files: F12: Open File.
The extension can open any file with relative path living in