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

[html] Add support for Angular2 #4927

Closed
maliksahil opened this issue Apr 4, 2016 · 16 comments
Closed

[html] Add support for Angular2 #4927

maliksahil opened this issue Apr 4, 2016 · 16 comments
Assignees
Labels
*extension-candidate Issue identified as good extension implementation feature-request Request for new features or functionality languages-basic Basic language support issues
Milestone

Comments

@maliksahil
Copy link

Currently VSCode does not have support for Angular2. But it does seem to have prompts for Angular1.
This makes writing Angular2 code difficult.
For instance, when authoring a template for a component, if I wish to use *ngFor, I am prompted to pick Angular1 directives -

image

Also, VSCode is currently blind to Angular2 component semantics. It would be great if those showed up in intellisense, which would make composing applications a lot easier. This of course applies to more than just components.

I propose that support for Angular2 be added, and it should be implemented as an extension. So individual projects can pick and choose between Angular1 or Angular2.

@Tyriar Tyriar added feature-request Request for new features or functionality languages-basic Basic language support issues labels Apr 4, 2016
@Tyriar
Copy link
Member

Tyriar commented Apr 4, 2016

I think this is blocked on #2784

@johnpapa
Copy link

johnpapa commented Apr 9, 2016

I agree that better support would be awesome!

For now there are html and typescript snippets for angular2 that i wrote in the marketplace. https://marketplace.visualstudio.com/items?itemName=johnpapa.Angular2

Also, there is a request in user voice for auto imports. this would rock https://visualstudio.uservoice.com/forums/293070-visual-studio-code/suggestions/13344849-auto-imports-in-typescript

@aeschli aeschli changed the title Add support for Angular2 [html] Add support for Angular2 Apr 12, 2016
@aeschli aeschli added this to the Backlog milestone Apr 12, 2016
@aeschli
Copy link
Contributor

aeschli commented Apr 12, 2016

It would be great if an extension could add that behavior. Extensions can already participate on code completions. They would have to do the same parsing as the HTML language mode to figure out at what location the user wants to complete.

@oodboo
Copy link

oodboo commented May 5, 2016

Intellisense, color schema and Emet already works in HTML, could you apply on template?
For instance in Angular 2 if :

 template: `   ` 

pattern is recognized everything inside of should behave as HTML?

@aeschli
Copy link
Contributor

aeschli commented May 6, 2016

@oodboo Is that in JavaScript? If yes, please file a separate issue for it. This bug is about improving the HTML support.

@oodboo
Copy link

oodboo commented May 6, 2016

I have just found #2000 which basically says the same thing ... so I do not know should I copy text there ...

@aeschli
Copy link
Contributor

aeschli commented May 6, 2016

@oodboo #2000 looks like the right bug. Yes, add your example and suggestions there.

@jorgeas80
Copy link

So, no intellisense for angular 2 yet? I'm using the amazing @johnpapa snippets, but it would be great to have intellisense and autoimports for angular 2

@stgolem
Copy link

stgolem commented Oct 21, 2016

Look for info here microsoft/TypeScript#6508 and here angular/angular#7482

@mgechev
Copy link

mgechev commented Oct 22, 2016

Yes, angular/angular#7482 will provide great improvements for the Angular development experience in VSCode. Currently with the tslint plugin and codelyzer you can get warnings in inline templates/styles, for instance, for binding to private/missing properties or unused CSS.

@kuncevic
Copy link

I am just creating angular 2 inline template It wold of being nice to autocorrelate dom events like if you type <button (mouse... expecting it will autocomplete with mouseover

@mgechev
Copy link

mgechev commented Nov 10, 2016

@kuncevic this is out of the scope of codelyzer but the language service that the Angular team is working on will provide such feature. Take a look at this talk by Misko Hevery from ng-europe. Soon will be released a VSCode extension which works together with the language service in order to provide autocompletion and much more.

@alejandrohn
Copy link

I have vs code installed but the variables of the class are not displayed in the template (html) of component, not intellisense, not show the variables, I have use angular 4 with snippets of john papa, have I install some extension?

@kukjevov
Copy link

Here is extension which is still work in progress.

https://github.com/angular/vscode-ng-language-service

@alejandrohn
Copy link

Thanks, it really works

@mjbvz mjbvz added the *extension-candidate Issue identified as good extension implementation label Oct 12, 2017
@mjbvz
Copy link
Collaborator

mjbvz commented Oct 12, 2017

Yes, this extension provides angular 2 support: https://marketplace.visualstudio.com/items?itemName=Angular.ng-template

@mjbvz mjbvz closed this as completed Oct 12, 2017
@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 26, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
*extension-candidate Issue identified as good extension implementation feature-request Request for new features or functionality languages-basic Basic language support issues
Projects
None yet
Development

No branches or pull requests