[英]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. 我正在使用Angular 2迈出第一步,并且在WebStorm中遇到一种奇怪的行为,如下所示。 It expects for a newline or something for some reason.
它出于某种原因期望换行或其他内容。
Everything is working fine on the browser side, but WebStorm remains complaining. 在浏览器方面一切正常 ,但WebStorm仍在抱怨。 Am I missing something?
我想念什么吗? Please, find below my WebStorm specs.
请在下面找到我的WebStorm规格。
I guess you are using a very old version/guide of angular2. 我想您使用的是angular2的非常旧的版本/指南。 The template syntax has changed for a while now.
模板语法已经更改了一段时间。 To do a for loop you have to use the
let
keyword: 要进行for循环,您必须使用
let
关键字:
<tr *ngFor="let product of products"></tr>
For the latest documentation and quickstart, best way to start is at angular.io 有关最新文档和快速入门,最好的启动方法是在angular.io
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.