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

Language Service not working out-of-the-box with angular 10 #844

Closed
DibyodyutiMondal opened this issue Jul 6, 2020 · 5 comments
Closed
Labels

Comments

@DibyodyutiMondal
Copy link

DibyodyutiMondal commented Jul 6, 2020

Describe the bug
This is basically the same as #824

Angular language service plugin does not work in template files (.html) out of the box

Expected behavior
Autocomplete feature should ideally be working without extra configuration

Additional context
The problem was solved by editing the tsconfig.app.json:

{
    "include": [
        "src/**/*.d.ts",  <= this was generated by the angular cli
        "src/**/*.ts" <= this was added by me, otherwise it would not work
      ]
}

However, this results in warnings like:
image

PS: Not sure if this should be an issue for the CLI or the language service, but this was basically a continuation of #824, so decided to put it in here.

@mateusz-pietrzak
Copy link

I encountered same problem. It only affects files that are not imported anywhere in the project. As soon as file is included in compilation intellisense picks it up and autocomplete starts to work.

@DibyodyutiMondal
Copy link
Author

I am importing the files but still getting an error.
The entry-point 'main.ts' imports 'app.module.ts' which imports 'app.component.ts' which in turn has the template. The typescript file for the component has autocomplete features etc that works fine. 'ng build' works fine too. Only the template files don't show any kind of autocomplete whatsoever, until I change the 'tsconfig.app.json'

@kyliau
Copy link
Contributor

kyliau commented Jul 10, 2020

this is a duplicate of angular/angular-cli#18040 and it has to be fixed from the CLI side. Please track the progress there.

@kyliau kyliau closed this as completed Jul 10, 2020
@DibyodyutiMondal
Copy link
Author

Thank you!

@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 Aug 10, 2020
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

3 participants