Angular 2.0.0-rc.3新表格e2e规范 - 无法绑定到'formGroup',无法绑定到'formControlName'等

Ros*_*ort 5 angular2-forms angular

我刚刚更新了我的应用程序中的所有表单以使用Angular2-rc3的新表单模块,并且我无法在不看模板解析错误的情况下运行规范.

我的表单在应用程序中运行良好,但是当我运行规范时,我看到的错误如下:

ERROR: 'Unhandled Promise rejection:', 'Template parse errors:
Can't bind to 'formGroup' since it isn't a known native property
Run Code Online (Sandbox Code Playgroud)

ERROR: 'Unhandled Promise rejection:', 'Template parse errors:
Can't bind to 'formControlName' since it isn't a known native property
Run Code Online (Sandbox Code Playgroud)

我还得到关于使用旧表单模块的警告(我实际上并没有在任何地方使用..我在浏览器控制台中没有收到此错误)

WARN: '
  *It looks like you're using the old forms module. This will be opt-in in the next RC, and
  will eventually be removed in favor of the new forms module. For more information, see:
  https://docs.google.com/document/u/1/d/1RIezQqE4aEhBRmArIAS1mRIZtWFf6JxN_7B4meyWK0Y/pub
'
Run Code Online (Sandbox Code Playgroud)

在将我的应用程序代码迁移到最新的Forms API时,我在本地运行应用程序时在浏览器控制台中看到了这些错误.我能够通过遵循文档并导入正确的指令来修复它们.不幸的是,现在我正在运行测试,这些错误正在我的终端中发生.我还没有找到有关如何将测试迁移到新表单模块的任何资源...任何想法?

Oci*_*rne 0

我想可能对你有帮助,伙计!当然对我来说是这样,并且和你有同样的错误。