You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 21, 2025. It is now read-only.
Repository navigation
This repository was archived by the owner on Nov 21, 2025. It is now read-only.
You'll see infos when over your components, autocomplete for properties binding, etc. But I'm working with inline templates, I didn't test with external templates yet.
My plan is to use the new plugin architecture in 2.3 by default. This plugin would only then be required to get completions from external template references.
This should coincide around the time of the official 2.3 release.
The first official release of this plugin (0.1.1) works only with TypeScript 2.1 and not with 2.2.
I think it should now be a bug to fix soon instead of an enhancement because angular/cli installs TS 2.2 by default, so the plugin is not compatible by default for many angular projects.
I will be working on this next week. Unfortunately, many of the internal APIs to TypeScript changed significantly with 2.2 so the upgrade is not simple.
Reacted by Aleš, Edoardo Tassinari, Marek Buko and Chris
@fxck I am working on it this week. I met with the TypeScript team last week and we came up with a better long-term strategy that is less likely to be broken as the TypeScript team is making changes. I am implementing my part this week.
Reacted by Daniel Zuidinga, Aleš, Hugo Campos and kuzyas
@fxck Yes. 2.3 is the release we have been waiting for but it still doesn't have everything we need. I am coordinating with Microsoft, both the TypeScript and VSCode teams, regarding this. The changes necessary should be landing in the next couple of weeks.
My side has been implemented and is in Angular master. I have a PR for the the changes necessary for TypeScript out (tentatively slated for 2.3.2). The VSCode team is working on the changes to the TypeScript plugin that is necessary and most of which are currently in VSCode master. We need a subsequent change to handle external html files but that should also be landing in the next couple weeks.
Once all of this comes together I will update my plugin to use the new plugin architecture which will resolve most of this issues people have been having with the plugin as well as position the code to allow more features such as renaming references in templates.
Reacted by Aleš, Michael Chiche, Diego Maninetti and Marek Buko
I post you this question because I try to integrates @angular/language-service inside Eclipse with TypeScript Plugins. It works great with @Component/template inside a TypeScript file but not when template is declared in html file.
@angelozerr Correct.I have a PR pending to TypeScript that enables it and we are working through the details of landing it. Once that is landed the TypeScript service will handle request for external templates.
However, it is an exercise for the integrator how to get the editor to direct in html files requests to TypeScript.
The current plans for VSCode is for TypeScript extensions to be able to add file types which should be handled by the TypeScript service. This plugin then would become a VSCode TypeScript plugin that would add html files to that list along with registering @angular/language-service as a TypeScript global extension.
In my HTML editor I consumes the same commands than tsserver like open, change, etc commands, but it doesn't work. When you will have time please tell me which tsserver commad, an editor must consumes (ex: pass a particulary skriptKing 'html' when an HTML editor is opened?) Thanks!
I don't know what could be wrong as this is one of the tests I run to validate the language service works.
One thing you could try is opening app.component.ts first and see if that helps.
What getExternalFiles does is allow tsserver to query a plugin to calculate a list of external files to include in a project that is associated with a particular tsconfig.json file. If the .html file is not associated with an angular project, the .html file will be treated as a loose .ts file.
@chuckjaz@angelozerr
Guys does this mean, that with Angular 4.2.0 and Typescript 2.4.0 this extensions for VSCode will be obsolete and it will work in VSCode or any editor that can work with typescript TSServer using just typescript plugin?
There will still be a Angular plugin for VSCode but it will change considerably. Instead of having its own server it will register with VSCode that @angular/language-service is a valid TypeScript plugin and provide a default plugin if the project doesn't include one.
The @angular/language-service plugin will work in any context that TypeScript runs in a node instance (this, at least for now, excludes Visual Studio proper). However, for completions to work in a external .html file, as demonstrated by @angelozerr above, requires the editor know to direct requests from the .html file to tsserver which is going to be different for each editor (and is, why the Angular plugin for VSCode is still necessary).
Hi @chuckjaz, it looks like that Typescript 2.4 RC is out and Angular 4.2.2 is also out :). Would it be possible to try to update plugin to these latest changes :). Maybe now it will work as it should :).
Updating past 2.1 is challenging with the existing architecture as there were some internal changes to TypeScript that broke my server. However, the TypeScript plugin architecture makes this moot and I am working to move to that but it is taking longer than I thought.
I will update the language service bundled with the 2.1 based server early next week if I cannot get all the pieces to land together for the new architecture.
If the .html file is not associated with an angular project, the .html file will be treated as a loose .ts file.
@chuckjaz I have a problem about that I think. Indeed when I open an HTML file which is not linked to an Angular Template, my HTML file is considered as a TypeScript file and semanticDiagnosticsSync returns TypeScript errors (my HTML have a lot of errors) and don't consume the semanticDiagnosticsSync of the Angular language service plugin. Is it a problem that you have though? Perhaps my integration is bad?
This is the reason I haven't converted over to the new plugin architecture yet. The TypeScript team is working with the VS Code team to resolve this.
The safest thing is to ask the Angular language service which files are templates and only request information from tsserver when this is true. There is no existing protocol for this, however, The solution Microsoft is working on is passing the kind of the file along with this request allowing the server to determine if the file should be treated as a TypeScript file.
Activity
cyrilletuzi commentedon Mar 1, 2017
If you want to get ahead :
npm install typescript@next --save-devThen in your tsconfig.json :
Finally choose this last version of TypeScript (2.3) in VS Code (on bottom right), and restart as suggested.
Ta da. No need of the extension, and it will be amazingly faster, as it does not run a duplicate typescript process.
doczoidberg commentedon Mar 1, 2017
How can I test?
I should go from html template to my variable definition via F12? this does not work.
cyrilletuzi commentedon Mar 1, 2017
You'll see infos when over your components, autocomplete for properties binding, etc. But I'm working with inline templates, I didn't test with external templates yet.
doczoidberg commentedon Mar 1, 2017
yes works with inline templates but not with external templates
chuckjaz commentedon Mar 6, 2017
My plan is to use the new plugin architecture in 2.3 by default. This plugin would only then be required to get completions from external template references.
This should coincide around the time of the official 2.3 release.
cyrilletuzi commentedon Apr 5, 2017
The first official release of this plugin (0.1.1) works only with TypeScript 2.1 and not with 2.2.
I think it should now be a bug to fix soon instead of an enhancement because angular/cli installs TS 2.2 by default, so the plugin is not compatible by default for many angular projects.
chuckjaz commentedon Apr 5, 2017
I will be working on this next week. Unfortunately, many of the internal APIs to TypeScript changed significantly with 2.2 so the upgrade is not simple.
fxck commentedon Apr 18, 2017
@chuckjaz any news on this? thank you
you only realise how big of a deal this plugin is when you can not use it
chuckjaz commentedon Apr 18, 2017
@fxck I am working on it this week. I met with the TypeScript team last week and we came up with a better long-term strategy that is less likely to be broken as the TypeScript team is making changes. I am implementing my part this week.
fxck commentedon Apr 28, 2017
@chuckjaz does that mean it will have to wait for a new version of typescript? Major? Minor?
fxck commentedon Apr 29, 2017
https://blogs.msdn.microsoft.com/typescript/2017/04/27/announcing-typescript-2-3/ guess this is it
chuckjaz commentedon May 1, 2017
@fxck Yes. 2.3 is the release we have been waiting for but it still doesn't have everything we need. I am coordinating with Microsoft, both the TypeScript and VSCode teams, regarding this. The changes necessary should be landing in the next couple of weeks.
My side has been implemented and is in Angular master. I have a PR for the the changes necessary for TypeScript out (tentatively slated for 2.3.2). The VSCode team is working on the changes to the TypeScript plugin that is necessary and most of which are currently in VSCode master. We need a subsequent change to handle external
htmlfiles but that should also be landing in the next couple weeks.Once all of this comes together I will update my plugin to use the new plugin architecture which will resolve most of this issues people have been having with the plugin as well as position the code to allow more features such as renaming references in templates.
angelozerr commentedon May 5, 2017
@chuckjaz do you mean that TypeScript team should manage
Plugin#getExternalFiles()https://github.com/Microsoft/TypeScript/blob/2150a7796b0dfe83c5286755410e0fd1646ed86c/src/server/project.ts#L270 It seems that you have implemented it https://github.com/angular/angular/blob/master/packages/language-service/src/ts_plugin.ts#L17 but TypeScript doesn't use it?I post you this question because I try to integrates @angular/language-service inside Eclipse with TypeScript Plugins. It works great with @Component/template inside a TypeScript file but not when template is declared in html file.
Thanks for your answer.
chuckjaz commentedon May 5, 2017
@angelozerr Correct.I have a PR pending to TypeScript that enables it and we are working through the details of landing it. Once that is landed the TypeScript service will handle request for external templates.
However, it is an exercise for the integrator how to get the editor to direct in html files requests to TypeScript.
The current plans for VSCode is for TypeScript extensions to be able to add file types which should be handled by the TypeScript service. This plugin then would become a VSCode TypeScript plugin that would add
htmlfiles to that list along with registering@angular/language-serviceas a TypeScript global extension.5 remaining items
fxck commentedon Jun 5, 2017
So it was merged just now. Hopefully coming with the nest minor release.
angelozerr commentedon Jun 7, 2017
@chuckjaz I'm trying to consume "definition" tsserver command inside Eclipse from HTML angular template
app.component.html:to retrieve definition of
titleproperty declared in a TypeScript filewith :
getExternalFilesgetExternalFilesIn my HTML editor I consumes the same commands than tsserver like open, change, etc commands, but it doesn't work. When you will have time please tell me which tsserver commad, an editor must consumes (ex: pass a particulary skriptKing 'html' when an HTML editor is opened?) Thanks!
chuckjaz commentedon Jun 7, 2017
I don't know what could be wrong as this is one of the tests I run to validate the language service works.
One thing you could try is opening
app.component.tsfirst and see if that helps.What
getExternalFilesdoes is allowtsserverto query a plugin to calculate a list of external files to include in a project that is associated with a particulartsconfig.jsonfile. If the.htmlfile is not associated with an angular project, the .html file will be treated as a loose .ts file.angelozerr commentedon Jun 8, 2017
@chuckjaz sorry for the noise, it was my fault, it works great now, here a little demo with @angular/language-service with Eclipse and HTML editor:
It works great! Many thank's for your great work!
kukjevov commentedon Jun 8, 2017
@chuckjaz @angelozerr
Guys does this mean, that with Angular 4.2.0 and Typescript 2.4.0 this extensions for VSCode will be obsolete and it will work in VSCode or any editor that can work with typescript TSServer using just typescript plugin?
chuckjaz commentedon Jun 8, 2017
There will still be a Angular plugin for VSCode but it will change considerably. Instead of having its own server it will register with VSCode that
@angular/language-serviceis a valid TypeScript plugin and provide a default plugin if the project doesn't include one.The
@angular/language-serviceplugin will work in any context that TypeScript runs in a node instance (this, at least for now, excludes Visual Studio proper). However, for completions to work in a external.htmlfile, as demonstrated by @angelozerr above, requires the editor know to direct requests from the.htmlfile totsserverwhich is going to be different for each editor (and is, why the Angular plugin for VSCode is still necessary).kukjevov commentedon Jun 14, 2017
Hi @chuckjaz, it looks like that Typescript 2.4 RC is out and Angular 4.2.2 is also out :). Would it be possible to try to update plugin to these latest changes :). Maybe now it will work as it should :).
I just look forward for this awesome plugin :).
Thank you
chuckjaz commentedon Jun 14, 2017
Updating past 2.1 is challenging with the existing architecture as there were some internal changes to TypeScript that broke my server. However, the TypeScript plugin architecture makes this moot and I am working to move to that but it is taking longer than I thought.
I will update the language service bundled with the 2.1 based server early next week if I cannot get all the pieces to land together for the new architecture.
chuckjaz commentedon Jun 23, 2017
Fixed in 0.1.4
angelozerr commentedon Jul 10, 2017
@chuckjaz I have a problem about that I think. Indeed when I open an HTML file which is not linked to an Angular Template, my HTML file is considered as a TypeScript file and
semanticDiagnosticsSyncreturns TypeScript errors (my HTML have a lot of errors) and don't consume thesemanticDiagnosticsSyncof the Angular language service plugin. Is it a problem that you have though? Perhaps my integration is bad?Thanks for your help!
chuckjaz commentedon Jul 10, 2017
This is the reason I haven't converted over to the new plugin architecture yet. The TypeScript team is working with the VS Code team to resolve this.
The safest thing is to ask the Angular language service which files are templates and only request information from tsserver when this is true. There is no existing protocol for this, however, The solution Microsoft is working on is passing the kind of the file along with this request allowing the server to determine if the file should be treated as a TypeScript file.
angelozerr commentedon Jul 10, 2017
As usually, many thanks for your great info! Thanks @chuckjaz !
angular-automatic-lock-bot commentedon Feb 14, 2020
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.