Webpack错误:错误TS2305:模块'“angular2 / http”'没有导出成员'HTTP_PROVIDERS'

时间:2016-01-12 06:18:12

标签: webpack angular

我开始使用Angular 2和Webpack但仍然出现错误

    ERROR in C:\msweb\ng2Boilerplate\src\comps\myip\Myip.ts
(8,9): error TS2305: Module '"angular2/http"' has no exported member 'HTTP_PROVIDERS'.

ERROR in C:\msweb\ng2Boilerplate\src\comps\digg\DiggLoader.ts
(3,9): error TS2305: Module '"angular2/http"' has no exported member 'HTTP_PROVIDERS'.

ERROR in C:\msweb\ng2Boilerplate\src\comps\app2\App2.ts
(19,9): error TS2305: Module '"angular2/http"' has no exported member 'HTTP_PROVIDERS'.

ERROR in C:\msweb\ng2Boilerplate\src\comps\app1\App1.ts
(3,9): error TS2305: Module '"angular2/http"' has no exported member 'HTTP_PROVIDERS'.
webpack: bundle is now VALID.

我的文件也是标准的,如:

    ///<reference path="../../../typings/app.d.ts" />

import {Component} from "angular2/core";
import {Consts} from "../../Conts";
import {Observable} from 'rxjs/Observable';
import 'rxjs/add/operator/do';
import {AsyncSubject} from "rxjs/subject/AsyncSubject";
import {HTTP_PROVIDERS, Http} from 'angular2/http';
//import {JSONP_PROVIDERS, Jsonp} from 'angular2/http';

interface IIpAddress {
    ip: string;
}

@Component({
    selector: 'MyIp',

最新的Angular 2 beta.0

这是我的Bootstrap,基本:

bootstrap(App, [ROUTER_PROVIDERS,
provide(CommBroker, {useClass: CommBroker}),
provide(Consts, {useClass: Consts}),
provide(LocationStrategy, {useClass: HashLocationStrategy})]);

我的webpack配置非常香草......这是最新ng2中没有导出标题的错误吗?谷歌似乎不知道

TX

肖恩

0 个答案:

没有答案