问题
The Angular language service does not work in VSCode. In HTML there is no intellisense when using F12 to go to component.
The tsconfig.json
gives no errors when opened in VSCode.
回答1:
The problem was a trailing comma in the tsconfig.json. Which is allowed in vscode. but can't parsed as json.
With Help
- Toggle Developer Tools
it shows the message in a browser console.
The problem was solved after removing the trailing comma and restart vsCode / project
回答2:
For all other google'ers that end up here the upcoming days: There is a bug in version v0.1100.3 and downgrading to version v0.1100.2 is the solution for many:
https://github.com/angular/vscode-ng-language-service/issues/1063
You can install another version directly in VSCode:
回答3:
In may case, this was due to a conflict with another extension. I uninstalled some of the extensions (specifically nunjucks) and restarted VSCode, then intellisense on HTML came back.
回答4:
try it , may be solved
VSCode - User Settings
"editor.snippetSuggestions": "top",
to
"editor.snippetSuggestions": "inline",
来源:https://stackoverflow.com/questions/54393646/angular-language-service-not-working-in-vscode