Skip to content

Commit

Permalink
fix: simplification app.component (#286)
Browse files Browse the repository at this point in the history
  • Loading branch information
HenryT-CG authored Nov 23, 2024
1 parent 469e73c commit c7ab34e
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 16 deletions.
1 change: 0 additions & 1 deletion karma.conf.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// Karma configuration file, see link for more information
// https://karma-runner.github.io/6.4/config/configuration-file.html
// process.env.CHROME_BIN = require('puppeteer').executablePath()

module.exports = function (config) {
config.set({
Expand Down
4 changes: 3 additions & 1 deletion src/app/app.component.spec.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
import { NO_ERRORS_SCHEMA } from '@angular/core'
import { TestBed } from '@angular/core/testing'

import { AppComponent } from './app.component'

describe('AppComponent', () => {
beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [AppComponent]
declarations: [AppComponent],
schemas: [NO_ERRORS_SCHEMA]
}).compileComponents()
})

Expand Down
22 changes: 8 additions & 14 deletions src/app/app.module.ts
Original file line number Diff line number Diff line change
@@ -1,23 +1,18 @@
import { APP_INITIALIZER, CUSTOM_ELEMENTS_SCHEMA, NO_ERRORS_SCHEMA, NgModule } from '@angular/core'
import { APP_INITIALIZER, NgModule } from '@angular/core'
import { CommonModule } from '@angular/common'
import { HttpClient, provideHttpClient, withInterceptorsFromDi } from '@angular/common/http'
import { RouterModule, Routes } from '@angular/router'
import { BrowserModule } from '@angular/platform-browser'
import { BrowserAnimationsModule } from '@angular/platform-browser/animations'
import { TranslateLoader, TranslateModule, TranslateService } from '@ngx-translate/core'

import {
APP_CONFIG,
AppStateService,
createTranslateLoader,
translateServiceInitializer,
PortalCoreModule,
UserService
} from '@onecx/portal-integration-angular'
import { KeycloakAuthModule } from '@onecx/keycloak-auth'
import { createTranslateLoader } from '@onecx/angular-accelerator'
import { APP_CONFIG, AppStateService, UserService } from '@onecx/angular-integration-interface'
import { translateServiceInitializer, PortalCoreModule } from '@onecx/portal-integration-angular'

import { AppComponent } from './app.component'
import { environment } from 'src/environments/environment'
import { AppComponent } from './app.component'

const routes: Routes = [
{
Expand All @@ -31,13 +26,13 @@ const routes: Routes = [
imports: [
CommonModule,
BrowserModule,
KeycloakAuthModule,
BrowserAnimationsModule,
KeycloakAuthModule,
PortalCoreModule.forRoot('onecx-permission-ui'),
RouterModule.forRoot(routes, {
initialNavigation: 'enabledBlocking',
enableTracing: true
}),
PortalCoreModule.forRoot('onecx-permission-ui'),
TranslateModule.forRoot({
isolate: true,
loader: {
Expand All @@ -56,8 +51,7 @@ const routes: Routes = [
deps: [UserService, TranslateService]
},
provideHttpClient(withInterceptorsFromDi())
],
schemas: [NO_ERRORS_SCHEMA, CUSTOM_ELEMENTS_SCHEMA]
]
})
export class AppModule {
constructor() {
Expand Down
Empty file.

0 comments on commit c7ab34e

Please sign in to comment.