Victor Hugo Montes
Victor Hugo Montes

Reputation: 1322

WebStorm 2016.2.3 does not recognise *ngFor in html tag

I am taking my first steps using Angular 2 and I am experiencing a strange behaviour in WebStorm as shown below. It expects for a newline or something for some reason.

Sintax problem WebStorm Angular

Everything is working fine on the browser side, but WebStorm remains complaining. Am I missing something? Please, find below my WebStorm specs.

Upvotes: 0

Views: 333

Answers (1)

Poul Kruijt
Poul Kruijt

Reputation: 71891

I guess you are using a very old version/guide of angular2. The template syntax has changed for a while now. To do a for loop you have to use the let keyword:

<tr *ngFor="let product of products"></tr>

For the latest documentation and quickstart, best way to start is at angular.io

Upvotes: 4

Related Questions