Angular 使用NG2表示角度2

Angular 使用NG2表示角度2,angular,Angular,我有一个问题,因为我尝试使用'article'或'div' 错误: message: 'Can't bind to 'ngForFor' since it isn't a known property of 'div'.' message: 'Property binding ngForFor not used by any directive on an embedded template. Make sure that the property name is spelled co

我有一个问题,因为我尝试使用'article'或'div'

错误:

 message: 'Can't bind to 'ngForFor' since it isn't a known property of 'div'.'



 message: 'Property binding ngForFor not used by any directive on an embedded template. Make sure that the property name is spelled correctly and all directives are listed in the "@NgModule.declarations".'


<section class='mycontainer'>
  <article *ngFor="let numberStep for steps; let i = index" 
    [ngClass]="article + i">
    <div class='line'></div>
    <div class='circle'></div>
  </article>
</section>
message:'无法绑定到'ngForFor',因为它不是'div'的已知属性。'
消息:“嵌入模板上的任何指令都不使用属性绑定ngForFor。”。确保属性名称拼写正确,并且所有指令都列在“@NgModule.declarations”中
如何使用带分隔符的*ngFor

对不起,我的英语不好。

应该是

*ngFor="let numberStep of steps; let i = index;"
您还需要确保已将CommonModule导入该组件的模块,文章应该是

*ngFor="let numberStep of steps; let i = index;"
您还需要确保已将CommonModule导入该组件的模块,文章使用ngFor=“let numberStep of steps;let i=index”或ngFor=“let numberStep in steps;let i=index”

使用for inside*ngFor指令是错误的

使用ngFor=“let numberStep of steps;let i=index”或ngFor=“let numberStep in steps;let i=index”


使用for inside*ngFor指令实际上是一个本机html 5标记,这是一个错误。。这里没有角度组件,我的意思是,使用元素的任何组件都需要将Commonmodule导入其父模块实际上是一个本机html 5标记。。这里没有角度组件,我的意思是,使用元素的任何组件都需要将Commonmodule导入其父模块