I'm working on an Angular 6
app, and using VSCode 1.31.1
on Windows 7 with Angular Language Service 0.1.11
.
When I right-click a method name and select "Find all references", references from templates do not show up.
This makes refactoring harder : when renaming a field/method, one can easily miss calls to this field/method from either html files or inlined templates.
Is there a setting or an extension that can help ?
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.
Now open Visual Studio Code. Go to "File" > "Open Folder" and select "First-Angular-Project" from the "Desktop". Now in the "TERMINAL" run ng new Angular-Project-Demo. Whenever it prompts with something like "Would you like to add Angular routing? (y/N)" press "y" and hit "ENTER".
There is an issue for that, which is now implemented.
This has been fixed by the new Ivy-native language service, released in v11.1.0. It's an opt-in feature for now, please give it a try and let us know if you have any feedback. For the best editor experience, please make sure your project has
strictTemplates
enabled inangularCompilerOptions
. In case you run into similar bug, please file a new issue. I'll close this for now.
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