2015-12-16 39 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