简体   繁体   English

Angular 2 RC.5 FormsModule不存在

[英]Angular 2 RC.5 FormsModule doesn't exist

I am upgrading from rc.4 to rc.5 and all of the documentation I've found tells me that I should import the FormsModule into my app.module.ts file 我正在从rc.4升级到rc.5,发现的所有文档都告诉我应该将FormsModule导入到我的app.module.ts文件中

import { FormsModule } from '@angular/forms';

However when I try to do that I get an error that says the app cannot resolve symbol 'FormsModule'. 但是,当我尝试这样做时,我收到一条错误消息,提示该应用程序无法解析符号“ FormsModule”。

I have tried doing npm install @angular/forms -D which downloaded and installed @angular/forms in my node_modules, but that didn't help. 我尝试做npm install @angular/forms -D ,它在我的node_modules中下载并安装了@ angular / forms,但这没有帮助。 I also tried updating my typescript to 1.8.10 and my typings to 1.3.3 then running typings install , but again that didn't fix it. 我还尝试将我的打字稿更新为1.8.10,将我的打字稿更新为1.3.3,然后运行typings install ,但这又没有解决。

What am I missing here? 我在这里想念什么? Is the documentation incorrect? 文档不正确吗?

References: https://angular.io/docs/ts/latest/cookbook/rc4-to-rc5.html and https://www.barbarianmeetscoding.com/blog/2016/08/13/updating-your-angular-2-app-from-rc4-to-rc5-a-practical-guide/ 参考: https : //angular.io/docs/ts/latest/cookbook/rc4-to-rc5.htmlhttps://www.barbarianmeetscoding.com/blog/2016/08/13/updating-your-angular- 2从RC4到RC5的实用指南/

更新到rc.5还需要将@ angular / forms更新到0.3.0。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM