VSCode IntelliSense doesn't suggest Angular modules until imported manually in the project

后端 未结 2 1780
独厮守ぢ
独厮守ぢ 2021-01-21 07:39

First you have to understand that I\'m switching from IntelliJ to VSCode (Maybe I was too comfortable the way IntelliJ was looking for modules).

I\'ll mostly use VSCode

2条回答
  •  爱一瞬间的悲伤
    2021-01-21 07:52

    I reproduced, understood and solved this problem and actually to have the httpClient stuff in the hints, you've to add also the node_modules/@angular/common/http. This has to do with the way they export the type definitions, you can find my issue that you can upvote with further information on why it happens exactly and shortly a PR to solve this here https://github.com/angular/angular/issues/35237

    Anyway, to reproduce this you can also just head over to stackblitz and try to input "httpc" and you'll see no suggestion.

提交回复
热议问题