Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed null injector error for map-viewer app #757

Merged
merged 1 commit into from
Jan 10, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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,8 +15,12 @@
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 @@
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
Loading