我正在开发 angular 2 release 6 应用程序和以下代码行:
<input #instance="ngbTypeahead" type="text" class="form-control" [(ngModel)]="item.outputProjection.name" [ngbTypeahead]="search" />
Run Code Online (Sandbox Code Playgroud)
我收到以下错误:
DatacartComponent.html:60 ERROR TypeError: Cannot read property 'name' of undefined
at Object.eval [as updateDirectives] (DatacartComponent.html:60)
at Object.debugUpdateDirectives [as updateDirectives] (core.js:11914)
at checkAndUpdateView (core.js:11307)
at callViewAction (core.js:11548)
at execEmbeddedViewsAction (core.js:11511)
at checkAndUpdateView (core.js:11308)
at callViewAction (core.js:11548)
at execEmbeddedViewsAction (core.js:11511)
at checkAndUpdateView (core.js:11308)
at callViewAction (core.js:11548)
Run Code Online (Sandbox Code Playgroud)
而且我不确定如何更好地检查引导程序预先输入的对象定义。
| 归档时间: |
|
| 查看次数: |
8752 次 |
| 最近记录: |