我想用TypeScript启动基本的Angular 2(测试版2)应用程序。我有以下app.ts
文件(从Angular's latest setup guide复制)无法导入Angular2引导方法
import {Component, View, bootstrap} from 'angular2/angular2';
@Component({
selector: 'app'
})
@View({
template: `
<div></div>
`
})
class AppComponent {
constructor() {}
}
bootstrap(AppComponent);
但是当我尝试编译它,我得到错误
错误TS2307:找不到模块 'angular2/angular2'。
如果我改用一些其他资源中发现的格式angular2/core
代替angular2/angular2
像
import {Component, View, bootstrap} from 'angular2/core';
我得到错误
错误TS2305:模块““node_modules/angular2 /核心“'没有导出成员'bootstrap'。
我应该怎么做才能导入它们?