【发布时间】:2016-09-01 22:45:41
【问题描述】:
我是 Angular 2 的新手,我正在学习“英雄”教程。
我需要导入这些模块:
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { FormsModule } from '@angular/forms';
我开始使用 Angular2 CLI(创建应用程序的简单方法),但现在当我尝试导入这些时,出现如下错误:
Error: Typescript found the following errors:"...node_modules/@angular/core/index"' has no exported member 'NgModule'.
我怎样才能包含它?
【问题讨论】:
-
确保您拥有最新的
@angular/core -
是的,请检查您的
package.json并查看@angular/core的版本是否至少为rc.5
标签: angular angularjs-ng-model angular-cli