Typescript 找不到模块';角度/普通';在angular2类型CRTIP中
我正在尝试angular 2中的一个示例登录表单,但当我将“form_指令”作为Typescript 找不到模块';角度/普通';在angular2类型CRTIP中,typescript,angular,npm,node-modules,angular2-forms,Typescript,Angular,Npm,Node Modules,Angular2 Forms,我正在尝试angular 2中的一个示例登录表单,但当我将“form_指令”作为 import { FORM_DIRECTIVES } from '@angular/common'; 它显示找不到错误角/公共模块。我包含的文件为 <script src="node_modules/angular2/es6/dev/src/testing/shims_for_IE.js"></script> <script src="node_modules/es6-sh
import { FORM_DIRECTIVES } from '@angular/common';
它显示找不到错误角/公共模块。我包含的文件为
<script src="node_modules/angular2/es6/dev/src/testing/shims_for_IE.js"></script>
<script src="node_modules/es6-shim/es6-shim.min.js"></script>
<script src="node_modules/systemjs/dist/system-polyfills.js"></script>
<script src="node_modules/angular2/bundles/angular2-polyfills.js"></script>
<script src="node_modules/systemjs/dist/system.src.js"></script>
<script src="node_modules/rxjs/bundles/Rx.js"></script>
<script src="node_modules/angular2/bundles/angular2.dev.js"></script>
如果我错过了任何模块,请有人帮助我
@angular/common
is Angular2>=RC.0。你问题中的脚本标签来自Angular2 beta
这可能适合您:
import { FORM_DIRECTIVES } from 'angular2/common';
@angular/common
是Angular2>=RC.0。你问题中的脚本标签来自Angular2 beta。嗨,gunter,它再次显示错误找不到模块“Angular2/common”抱歉,hunter我犯了一个错误,它工作正常。谢谢你,你到底想使用什么Angular2版本?我如何检查我的角度版本不确定,我自己不使用TS(只有Dart),我对npm和其他东西也不太了解angular2
绝对是RC
。如果使用它,将为最新版本创建项目结构和配置。system.js配置包含您可以调整的具体版本。