ngx-translate/http-loader

Cannot find module "@angular/common/http"

allabs4limp opened this issue · 1 comments

I have upgraded my npm to the latest version. The npm folder in my Visual Studio Application reads v6.0.3 while my package.json file also corresponds to this version 6.0.3.

But anytime i run my application i get the error cannot find module on the broswer
angular

I believe HttpClient is used in versions above 3x but obviously have a higher version installed.

Please HELP!!!!!!!!!!!

Did you include HttpModule in app.module.ts?
should be like this:

// app.module.ts:
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';

import { HttpClientModule } from '@angular/common/http';

@NgModule({
  imports: [
    BrowserModule,
    // Include it under 'imports' in your application module
    // after BrowserModule.
    HttpClientModule,
  ],
})
export class MyAppModule {}