Angular Can';t绑定到';ngForOf';因为它不是';t'的已知属性;李';

Angular Can';t绑定到';ngForOf';因为它不是';t'的已知属性;李';,angular,Angular,我卡住了。 我得到了标题中的错误。在html中,它显示messageBundle对象,并且具有完整的数据(因此没有丢失的数据)。数据是异步获取的,并且该部分正在工作,我得到了正确的数据并可以显示它,但我不能循环它。据我所知,循环的语法是正确的,因为它在其他几乎相同的组件上工作。app.module有BrowserModule,在子组件上,我尝试添加CommonModule和BrowserModule,但没有区别。所有人都认为这应该行得通,但行不通。 我怎么修理它 component.html:

我卡住了。 我得到了标题中的错误。在html中,它显示messageBundle对象,并且具有完整的数据(因此没有丢失的数据)。数据是异步获取的,并且该部分正在工作,我得到了正确的数据并可以显示它,但我不能循环它。据我所知,循环的语法是正确的,因为它在其他几乎相同的组件上工作。app.module有BrowserModule,在子组件上,我尝试添加CommonModule和BrowserModule,但没有区别。所有人都认为这应该行得通,但行不通。 我怎么修理它

component.html:

<div class = "contactList">
        <p>Contacts</p>
        <div >
            <div>{{messageBundle.contacts[0]}}</div>
            <li *ngFor="let contact of messageBundle.contacts">
                <span>{{contact.full_name}}</span>
            </li>
        </div>
    </div>
app.module.ts:

import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
...
import { MessageComponent } from './messages/message-window/message.component';

@NgModule({
  declarations: [
    AppComponent,
   ...
    MessageComponent
  ],
  imports: [
    BrowserModule,
    ...
  ],
  providers: [
      ...
  ],
  bootstrap: [AppComponent]
})
export class AppModule { }
没有语法错误。 我花了一个小时在这上面,把ngFor改成ngFor,所以它抛出了一个实际的错误,把它改回去,现在它工作了。
(╯°□°)╯︵ ┻━┻

您导入了
通用
-模块?导入CommonMdoule@SajadCommonModule已经是浏览器模块的一部分。我相信我的IDE中的问题已经解决了,只要我点击了关于这个问题的帖子。(我希望能早一点两分钟。)我相信ng serve也会导致这个问题
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
...
import { MessageComponent } from './messages/message-window/message.component';

@NgModule({
  declarations: [
    AppComponent,
   ...
    MessageComponent
  ],
  imports: [
    BrowserModule,
    ...
  ],
  providers: [
      ...
  ],
  bootstrap: [AppComponent]
})
export class AppModule { }