Skip to content

Commit

Permalink
Merge pull request #757 from geonetwork/fix-map-viewer
Browse files Browse the repository at this point in the history
Fixed null injector error for map-viewer app
  • Loading branch information
ronitjadhav authored Jan 10, 2024
2 parents 9cf95ec + 5bcb1b9 commit f89e411
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions apps/map-viewer/src/app/app.module.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { NgModule } from '@angular/core'
import { importProvidersFrom, NgModule } from '@angular/core'
import { BrowserModule } from '@angular/platform-browser'

import { AppComponent } from './app.component'
Expand All @@ -15,6 +15,10 @@ import { EffectsModule } from '@ngrx/effects'
import { storeFreeze } from 'ngrx-store-freeze'
import { environment } from '../environments/environment'
import { provideRepositoryUrl } from '@geonetwork-ui/api/repository'
import { BrowserAnimationsModule } from '@angular/platform-browser/animations'
import { provideGn4 } from '@geonetwork-ui/api/repository/gn4'
import { FeatureAuthModule } from '@geonetwork-ui/feature/auth'
import { FeatureCatalogModule } from '@geonetwork-ui/feature/catalog'

export const metaReducers: MetaReducer<any>[] = !environment.production

Check warning on line 23 in apps/map-viewer/src/app/app.module.ts

View workflow job for this annotation

GitHub Actions / Format check, lint, unit tests

Unexpected any. Specify a different type
? [storeFreeze]
Expand All @@ -24,14 +28,20 @@ export const metaReducers: MetaReducer<any>[] = !environment.production
declarations: [AppComponent],
imports: [
BrowserModule,
BrowserAnimationsModule,
FeatureMapModule,
TranslateModule.forRoot(TRANSLATE_DEFAULT_CONFIG),
UtilI18nModule,
StoreModule.forRoot({}, { metaReducers }),
StoreDevtoolsModule.instrument(),
EffectsModule.forRoot(),
FeatureCatalogModule,
],
providers: [
importProvidersFrom(FeatureAuthModule),
provideRepositoryUrl('/geonetwork/srv/api'),
provideGn4(),
],
providers: [provideRepositoryUrl('/geonetwork/srv/api')],
bootstrap: [AppComponent],
})
export class AppModule {
Expand Down

0 comments on commit f89e411

Please sign in to comment.