angular - Angular *ngFor devmode TypeError: a[getSymbolIterator(...)]
问题描述
我在 Angular 6.1.7 上,当我*ngFor
在调试模式下使用数组时,我一直有这个错误:
AddressEditComponent.html:36 ERROR TypeError: a[getSymbolIterator(...)] is not a function
at areIterablesEqual (core.js:5492)
at devModeEqual (core.js:5421)
at checkBindingNoChanges (core.js:7689)
at checkNoChangesNodeInline (core.js:10552)
at checkNoChangesNode (core.js:10541)
at debugCheckNoChangesNode (core.js:11144)
at debugCheckDirectivesFn (core.js:11072)
at Object.eval [as updateDirectives] (AddressEditComponent.html:37)
at Object.debugUpdateDirectives [as updateDirectives] (core.js:11061)
at checkNoChangesView (core.js:10440)
我的html很简单:
<select name="country" class="form-control" [(ngModel)]="address.country" >
<option value="">- Pays -</option>
<option *ngFor="let country of countries" value={{country}}>
{{country}}
</option>
</select>
国家是['France','another','another...']
自从我使用它就停止生产enableProdMode();
有什么解决办法吗?
难道我做错了什么 ?
解决方案
更新到最新版本的angular时解决了
推荐阅读
- python - 如何在 django 中过滤具有日期范围的查询
- java - 如何在 Java 方法中返回值?
- c# - 如何使碰撞在 Unity2D 中正常工作?
- javascript - 如何通过 JS 或 JQuery 删除 html 中的代码
- uwp - Windows 10 开发者设置中的 PIN 码在哪里?
- c# - 仪表板背景图。网络mvc核心
- c++ - 链接库和头文件 g++
- powershell - Invoke-Command 在本地运行时是在当前范围内运行还是在子范围内运行?
- java - 如何直接从复制或分享 URL 中获取 Instagram 图片或视频 URL?
- c++ - std::make_unique 带有空指针?