NullInjectorError: No provider for HttpClient!

agnusdei·2023년 7월 5일
0
post-custom-banner
import { ApplicationConfig, importProvidersFrom } from '@angular/core';
import {
  provideRouter,
  withEnabledBlockingInitialNavigation,
} from '@angular/router';
import { appRoutes } from './app.routes';
import { HttpClientModule } from '@angular/common/http';

export const appConfig: ApplicationConfig = {
  providers: [provideRouter(appRoutes, withEnabledBlockingInitialNavigation()),  importProvidersFrom(HttpClientModule)],
};

0개의 댓글