Another right way:
import { HttpModule } from ‘@angular/http’; on app.module.ts
import { Http } from ‘@angular/http’; on the page you’ll work on it with the constructor injection (public http: Http,) … so now you can manipulate with commands like this.http.get(…)
↧
Runtime Error Uncaught (in promise): Error: StaticInjectorError[HTTP]: StaticInjectorError[HTTP]: NullInjectorError: No provider for HTTP!
↧