2015-12-16 41 views
2

我将Angular 2更新为beta.0。并使用firebaseevent管从:https://github.com/sararob/angular2base自Angular 2测试版以来ExpressionChangedAfterItHasBeenCheckedException

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

现在我得到的错误:

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

它曾与alpha46。有任何想法吗?

在评论
+0

不确定,但这是原始回购FWIW:https://github.com/jeffbcross/pipeplay –

+0

请参见[#5918](https://github.com/angular/angular/issues/5918)和[ #5950](https://github.com/angular/angular/issues/5950) –

+0

我同样坚持使用相同的错误信息,请查看https://github.com/meandemo/ng2-demo.git,主人在alpha.52 =>确定,测试版beta分支在beta.0上=>很多错误:...在检查后发生了更改.... – user3636086

回答

1

正确答案:

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.

-2

请启用生产模式 enableProdMode();

+4

这不是问题的解决方案。这只是隐藏它。 –

+0

请参阅https://angular.io/docs/ts/latest/api/core/index/ExpressionChangedAfterItHasBeenCheckedException-class.html,因为@GünterZöchbauer说这不是一个解决方案,它只是隐藏了问题。 – martinmose