Skip to content

Commit

Permalink
fis imports in angular
Browse files Browse the repository at this point in the history
  • Loading branch information
Karan0005 committed Oct 14, 2024
1 parent a31f9e6 commit 18845f4
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 19 deletions.
13 changes: 1 addition & 12 deletions apps/frontend/src/modules/app.module.ts
Original file line number Diff line number Diff line change
@@ -1,23 +1,12 @@
import { provideHttpClient } from '@angular/common/http';
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { LoggerModule, NgxLoggerLevel } from 'ngx-logger';
import { CONFIG } from '../config/config';
import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
import { SharedModule } from './shared/shared.module';

@NgModule({
declarations: [AppComponent],
imports: [
SharedModule,
BrowserModule,
AppRoutingModule,
LoggerModule.forRoot({
level: CONFIG.logLevel === 'debug' ? NgxLoggerLevel.DEBUG : NgxLoggerLevel.ERROR
})
],
providers: [provideHttpClient()],
imports: [SharedModule, BrowserModule, AppRoutingModule],
bootstrap: [AppComponent]
})
export class AppModule {}
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
import { CommonModule } from '@angular/common';
import { provideHttpClient } from '@angular/common/http';
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { FormsModule } from '@angular/forms';
import { RestApiService } from '../../services';
import { SharedModule } from '../../shared.module';
import { MonacoEditorComponent } from '../monaco-editor/monaco-editor.component';
import { LandingPageComponent } from './landing-page.component';

Expand All @@ -12,9 +9,8 @@ describe('LandingPageComponent', () => {

beforeEach(async () => {
await TestBed.configureTestingModule({
imports: [CommonModule, FormsModule],
declarations: [LandingPageComponent, MonacoEditorComponent],
providers: [provideHttpClient(), RestApiService]
imports: [SharedModule],
declarations: [LandingPageComponent, MonacoEditorComponent]
}).compileComponents();

fixture = TestBed.createComponent(LandingPageComponent);
Expand Down
7 changes: 7 additions & 0 deletions apps/frontend/src/modules/shared/shared.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@ import { CommonModule } from '@angular/common';
import { provideHttpClient } from '@angular/common/http';
import { NgModule } from '@angular/core';
import { FormsModule } from '@angular/forms';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { LoggerModule, NgxLoggerLevel } from 'ngx-logger';
import { ToastrModule } from 'ngx-toastr';
import { CONFIG } from '../../config/config';
import { LandingPageComponent } from './components/landing-page/landing-page.component';
import { MonacoEditorComponent } from './components/monaco-editor/monaco-editor.component';
import { PageNotFoundComponent } from './components/page-not-found/page-not-found.component';
Expand All @@ -13,8 +16,12 @@ import { RestApiService } from './services';
imports: [
CommonModule,
FormsModule,
BrowserAnimationsModule,
ToastrModule.forRoot({
preventDuplicates: true
}),
LoggerModule.forRoot({
level: CONFIG.logLevel === 'debug' ? NgxLoggerLevel.DEBUG : NgxLoggerLevel.ERROR
})
],
providers: [provideHttpClient(), RestApiService]
Expand Down

0 comments on commit 18845f4

Please sign in to comment.