Angular2/http Exception no ConnectionBackend

后端 未结 3 715
情书的邮戳
情书的邮戳 2020-12-20 13:14

I attempting to use an angular2 http request, but I am getting the following error: [Error] EXCEPTION: No provider for ConnectionBackend! (AppComponent -> Http -> Connection

3条回答
  •  既然无缘
    2020-12-20 13:29

    src/main.ts

    import { HTTP_PROVIDERS, ConnectionBackend } from '@angular/http';
    
    bootstrap(AppComponent, [
      HTTP_PROVIDERS,
      ConnectionBackend
    ]);
    

    Using angular-cli@1.0.0-beta.10 and angular@2.0.0-rc.4

提交回复
热议问题