gpt4 book ai didi

angular - 错误 : Can't bind to 'ngForIn' . Angular 4+

转载 作者:太空狗 更新时间:2023-10-29 17:15:54 26 4
gpt4 key购买 nike

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

这是我的问题( 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'.

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

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

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

最佳答案

它需要是of而不是in

*ngFor="let country of countries" 

关于angular - 错误 : Can't bind to 'ngForIn' . Angular 4+,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47457318/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com