HTTP-PROVIDERS no longer used. Import the HttpModule into your ngModule and add it to your import.
import { HttpModule } from '@angular/http'; @NgModule({ imports: [ ... HttpModule, ], declarations: [...], bootstrap: [ .. ], providers: [ ... ], })
I suggest you always check the angular.io page for current information. For example, here is the use of Http and everything you need is described :)
In the service you want to use http, you import Http and enter it into your constructor:
import { Http } from '@angular/http';
source share