3

Angular2 rc.5 how to inject HTTP_PROVIDERS now that all are modules...

 var injector = ReflectiveInjector.resolveAndCreate(
            [
                TodoService,
                TodoAction,
                HTTP_PROVIDERS, // <----- no longer injectable
                TodoStatsModel,
                {provide: CommBroker, useClass: CommBroker},
                {provide: AppStore, useValue: th[![i][1]][1]s.appStore}
            ]);

regards,

Sean

born2net
  • 24,129
  • 22
  • 65
  • 104

1 Answers1

4

For RC5 you have to add the HttpModule in imports array inside @NgModule for more detail check this link

import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { HttpModule } from '@angular/http';

@NgModule({
  imports: [BrowserModule, HttpModule],
  declarations: [AppComponent],
  bootstrap: [AppComponent]
})
export class AppModule {}
rashfmnb
  • 9,959
  • 4
  • 33
  • 44