Visual Studio 2015 / resharper support for angular2

I have some questions about vs 2015, reshaper 10 and angular 2.

  • Is there syntax highlighting support for html markup in a ts file for visual studio 2015 or in resharper 10?

For example, when I use a multi-line string in the Component template.

@Component({ selector: "hello-world", template: ` <ul> <li *ngFor="#name of names">Hello {{name}}</li> </ul> ` }) 
  1. When I use ng2 keywords such as #inputName, (click) = "add (inputName)" in the html file show studio visual errors in the markup . How to solve this problem. It annoys him.

  2. I would like to have intellisense support for ng2 in html. I tried to find the aby resharper plugin, but to no avail.

+7
angular syntax-highlighting visual-studio-2015 typescript
source share
2 answers

I just downloaded the latest version of ReSharper 10.1 EAP , and now it supports Angular 2 annotations.

I took a screenshot from my code window. It looks much better! enter image description here

Unfortunately, it does not yet support anchor tags and the corresponding Intellisense in HTML template files.

+6
source share

Resharper version 2017.1 added support for Angular2 templates. See here: https://www.jetbrains.com/resharper/whatsnew/#v2017-1-angular-2

0
source share

All Articles