NG0303:可以绑定到' ngforof'
我知道有很多有关特定错误的信息,但是我从字面上做了他们的建议,我仍然缺少一些东西。 因此,我的组件内有一个数组,我试图通过 *ngfor在我的component.html中显示它。 因此,我在标题中说了这个错误,但是我试图创建一个简单的字符串和循环循环,并且实际上起作用。 在以下照片中,我能够看到我能够在.ts和.html中循环的评论阵列,并且在两者中也没有工作(成员:[Member []),这是两个事先的!
编辑:comp.html显示“让成员的成员”,但实际上是成员
Guys I know theres plenty of info about the specific error, but I literally did what they suggest and Im still missing something.
So I have an array inside my component.ts and Im trying to display it via *ngfor inside my component.html..
so Im getting that error said in the title, but I tried to create a simple array of string and loop through it and it actually worked.
in the following photos ull be able to see the commented array I was able to loop through in both .ts and .html and the one that didnt work (member: Member[]) also in both, thanks in advance!!
edit: comp.html shows 'let member of member' but its actually of members
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果是root模块(AppModule),则将BrowserModule添加到NGMODULE中的导入中,否则CommonModule。
Add BrowserModule to imports in NgModule if it's the root module (AppModule), otherwise the CommonModule.