Помогите пожалуйста разобраться. Я использую angular5. В нём вместо HttpModule используется более современный HttpClientModue
Я тоже попытался использовать HttpClientModue, но получил в консоли такую ошибку:
ERROR in src/app/app.module.ts(4,10): error TS2305: Module '"/home/kalinin/angular2/PRACTICE/tables/node_modules/@angular/common/http"' has no exported member 'HttpClientModue'.
WARNING in ./src/app/app.module.ts
27:16-31 "export 'HttpClientModue' was not found in '@angular/common/http'
kalinin@lenovo ~/angular2/PRACTICE/tables $ ng -v
_ _ ____ _ ___
/ \ _ __ __ _ _ _| | __ _ _ __ / ___| | |_ _|
/ △ \ | '_ \ / _` | | | | |/ _` | '__| | | | | | |
/ ___ \| | | | (_| | |_| | | (_| | | | |___| |___ | |
/_/ \_\_| |_|\__, |\__,_|_|\__,_|_| \____|_____|___|
|___/
Angular CLI: 1.5.0
Node: 7.2.0
OS: linux x64
Angular: 5.0.1
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router
@angular/cdk: 5.0.0-rc0-33edff5
@angular/cli: 1.5.0
@angular/material: 5.0.0-rc0-33edff5
@angular-devkit/build-optimizer: 0.0.32
@angular-devkit/core: 0.0.20
@angular-devkit/schematics: 0.0.35
@ngtools/json-schema: 1.1.0
@ngtools/webpack: 1.8.0
@schematics/angular: 0.1.2
typescript: 2.4.2
webpack: 3.8.1
"dependencies": {
"@angular/animations": "^5.0.1",
"@angular/cdk": "github:angular/cdk-builds",
"@angular/common": "^5.0.0",
"@angular/compiler": "^5.0.0",
"@angular/core": "^5.0.0",
"@angular/forms": "^5.0.0",
"@angular/http": "^5.0.0",
"@angular/material": "github:angular/material2-builds",
"@angular/platform-browser": "^5.0.0",
"@angular/platform-browser-dynamic": "^5.0.0",
"@angular/router": "^5.0.0",
"core-js": "^2.4.1",
"rxjs": "^5.5.2",
"zone.js": "^0.8.14"
},
Подключаю так:
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { HttpClientModue } from "@angular/common/http";
import {BrowserAnimationsModule} from '@angular/platform-browser/animations';
import { MatTableModule } from '@angular/material';
import { AppComponent } from './app.component';
import { UsertableComponent } from './usertable/usertable.component';
import { UserService } from './services/user.service';
@NgModule({
declarations: [
AppComponent,
UsertableComponent
],
imports: [
MatTableModule,
BrowserAnimationsModule,
BrowserModule,
HttpClientModue
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule { }
Пробовал удалить каталог node_modules и делать npm i
Как заставить ангуляр использовать HttpClientModue?