I tried to inject AccountService in the LoginService but it won\'t ,the accountService is undefined but in the other hand the authServiceProvider is defined .
Contraril
HttpClientModule is required for HttpClient. Just import in AppModule.
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
import { CoreModule } from './core/core.module';
import { HttpClientModule } from '@angular/common/http';
import { MatTreeModule } from '@angular/material';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
@NgModule({
declarations: [
AppComponent
],
imports: [
BrowserModule,
BrowserAnimationsModule,
AppRoutingModule,
CoreModule,
MatTreeModule,
FormsModule,
ReactiveFormsModule,
HttpClientModule //add this as fix, simple
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule { }