Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Angular autocomplete ( intellisense) not working in HTML #1629

Closed
StephaneAdeso opened this issue Apr 20, 2022 · 2 comments
Closed

Angular autocomplete ( intellisense) not working in HTML #1629

StephaneAdeso opened this issue Apr 20, 2022 · 2 comments
Labels

Comments

@StephaneAdeso
Copy link

StephaneAdeso commented Apr 20, 2022

Bug

I've been working with Angular in VScode for a while (2 years), and have used several versions of Node and Angular. I always have the same problem. Auto complete does not work well. 99% of the time it will not suggest anything to you.

Reproduction

In the example of the video that I have attached, the steps that I have followed are very simple. I have created a new project, I have added a variable in the component and I have tried to use it in the template.

versions

windows 11 X64
VScode: 1.66.2 dfd34e8260c270da74b5c2d86d61aee4b6d56977 x64
Node: v16.14.0
Angular CLI: 13.3.2
Package Manager: npm 8.5.4
Angular Language Service: v13.3.1

angularAutocomplete.mp4

Note:
Something very strange has happened to me. I enabled logs in verbose mode and restarted VScode. When trying again, now the autocomplete worked perfectly for me. The problem is that this is very erratic and doesn't work 99% of the time. I've had this problem for a couple of years. So I know that in 5 minutes, when I continue with the application it will crash again.

Note 2:
In the Angular extension settings, I have the option enable-strict-mode-prompt disabled. And now autocomplete works for me sometimes. At least, more than before. It still fails almost all the time, though.

This is my tsconfig.json file (it is the one generated by default when creating the project):

{
  "compileOnSave": false,
  "compilerOptions": {
    "baseUrl": "./",
    "outDir": "./dist/out-tsc",
    "forceConsistentCasingInFileNames": true,
    "strict": true,
    "noImplicitOverride": true,
    "noPropertyAccessFromIndexSignature": true,
    "noImplicitReturns": true,
    "noFallthroughCasesInSwitch": true,
    "sourceMap": true,
    "declaration": false,
    "downlevelIteration": true,
    "experimentalDecorators": true,
    "moduleResolution": "node",
    "importHelpers": true,
    "target": "es2017",
    "module": "es2020",
    "lib": [
      "es2020",
      "dom"
    ]
  },
  "angularCompilerOptions": {
    "enableI18nLegacyMessageIdFormat": false,
    "strictInjectionParameters": true,
    "strictInputAccessModifiers": true,
    "strictTemplates": true
  }
}
@atscott
Copy link
Collaborator

atscott commented Apr 20, 2022

Hi @Osolemio44, I noticed in the video that you have solution-style tsconfigs. I'm going to close this as a duplicate of #876. We have a potential fix for this here: angular/angular#45601

@atscott atscott closed this as completed Apr 20, 2022
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators May 21, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants