我試圖創建在plunker角2基本形式,但面臨着下面的錯誤在Chrome Dev的控制檯:formGroup預計Angular2形式FormGroup實例錯誤
VM8247:27 EXCEPTION: Error in ./App class App - inline template:1:12 caused by: formGroup expects a FormGroup instance. Please pass one in.
Example:
<div [formGroup]="myGroup">
<input formControlName="firstName">
</div>
In your class:
this.myGroup = new FormGroup({
firstName: new FormControl()
});
另外還有一些其他的錯誤也這或多或少表明上述錯誤。 我遇到過與此相關的其他答案,但其中大多數在他們的代碼中有錯別字。請致電plunker。
建議密切的原因:_這個問題是由一個問題,不能再生產或一個簡單的印刷錯誤造成的._ – halfer