As you know you can enable the following settings in VSCode to see the references in the editor:
"typescript.implementationsCodeLens.enabled": true,
"javascript.referencesCodeLens.enabled": true
As you see in the image below there are no references (See the code below and the grey reference-info-text above method-name 'myOperations') 0 references
)
But in reality, it exists! It exists within an angular template:
<div class="some-cool-class">
<my-super-thing
*ngIf="ifItIsCool"
(operations)="myOperations($event)"
>
</my-super-thing>
Can I handle that somehow? How can I see the references (method calls) from templates too?
You can use the Find All References command to find where particular code elements are referenced throughout your codebase. The Find All References command is available on the context (right-click) menu of the element you want to find references to. Or, if you are a keyboard user, press Shift + F12.
Open VSCode. Open the generated project. Press Ctrl + Shift ⇧ + P in Windows/Linux or Command ⌘ + Shift ⇧ + P in Mac to open VSCode's extension launcher. Type/Select Web Template Studio: Deploy Web App and press Enter to begin the deployment.
EDIT 26 Jan 2021 (from Johan Aspeling):
Seems to have finally been fixed with the new Ivy language service (used in Angular 11) Angular Language Service v11+
===
That feature is not supported in Angular's official language service.
There is an open issue to add it which is going completely ignored for over two years, and a second issue opened a year ago which is also being ignored.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With