Error: Can't bind to 'ngForIn' . Angular 4+

Error: Can't bind to 'ngForIn' . Angular 4+

这个问题已经有人提出了,但不幸的是没有答案对我有用。

这是我的问题 (angular 5):

<option 
    *ngFor="let country in countries" 
    [value]="country.id" >
       {{'page.choose_country' | translate}} *
</option>

我有一个简单的代码,但它仍然显示这个错误:

Can't bind to 'ngForIn' since it isn't a known property of 'option'.

它不接受 select 中的 *ngFor(我在输入中测试了相同的结果)

我找到了几个答案,如 commModulebowersModule 需要将其导入模块或放入 b..... 我试图在这里找到解决方案,但没有任何效果。

尽管我的英语很吓人,但我希望你能理解我一点点。 感谢您的回复

需要of而不是in

*ngFor="let country of countries" 

改变

*ngFor="let country in countries" 

*ngFor="let country of countries" 

没有ngForIn从Angular那边介绍:Ref Link