自 Angular 2 beta 以来的 ExpressionChangedAfterItHasBeenCheckedException

ExpressionChangedAfterItHasBeenCheckedException since Angular 2 beta

我将 Angular 2 更新为 beta.0。并使用以下来源的 firebaseevent 管道:https://github.com/sararob/angular2base

<tr *ngFor="#t of DBSERVER | firebaseevent:'child_added'">
    <td>{{t.Message}}</td>
    <td>{{t.Source}}</td>
</tr>

现在我得到错误:

Error: Expression 'DBSERVER | firebaseevent:'child_added' in Log@21:10' has changed after it was checked. Previous value: 'null'. Current value: 'undefined'
    at ExpressionChangedAfterItHasBeenCheckedException.BaseException [as constructor]

它适用于 alpha46。有什么想法吗?

评论中的正确答案:

Switching back to prod mode corrects (hides) the problem: import {enableProdMode} from 'angular2/core'; enableProdMode(); bootstrap(MainCmp, []) – user3636086 4 hours ago

'beta' branch of github.com/meandemo/ng2-demo.git, has been updated.

请启用生产模式 enableProdMode();