From 28c6182224396afba8686f9e84756c8d4538c2a1 Mon Sep 17 00:00:00 2001 From: Peter Bastiani Date: Mon, 15 Apr 2024 14:40:22 +0200 Subject: [PATCH] NullInjectorError: No provider for itemTypeService! --- projects/common-map/src/fm-map/common-map.module.ts | 3 ++- .../selected-item-cropfield.component.ts | 4 ++-- .../selected-item-geotiff/selected-item-geotiff.component.ts | 4 ++-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/projects/common-map/src/fm-map/common-map.module.ts b/projects/common-map/src/fm-map/common-map.module.ts index e25c454..118f351 100644 --- a/projects/common-map/src/fm-map/common-map.module.ts +++ b/projects/common-map/src/fm-map/common-map.module.ts @@ -9,7 +9,7 @@ import { ActionReducer, MetaReducer, StoreModule } from '@ngrx/store'; import { AngularOpenlayersModule } from 'ng-openlayers'; //common modules -import { AppCommonModule } from '@farmmaps/common'; +import { AppCommonModule, ItemTypeService } from '@farmmaps/common'; import * as mapActions from './actions/map.actions'; import * as mapEffects from './effects/map.effects'; @@ -212,6 +212,7 @@ export { GeolocationService, DeviceOrientationService, TemporalService, + ItemTypeService, { provide: AbstractFeatureListComponent, useClass: FeatureListCroppingschemeComponent, multi: true }, { provide: AbstractFeatureListComponent, useClass: FeatureListCropfieldComponent, multi: true }, { provide: AbstractFeatureListFeatureComponent, useClass: FeatureListFeatureComponent, multi: true }, diff --git a/projects/common-map/src/fm-map/components/selected-item-cropfield/selected-item-cropfield.component.ts b/projects/common-map/src/fm-map/components/selected-item-cropfield/selected-item-cropfield.component.ts index cbdd65e..ff95b6f 100644 --- a/projects/common-map/src/fm-map/components/selected-item-cropfield/selected-item-cropfield.component.ts +++ b/projects/common-map/src/fm-map/components/selected-item-cropfield/selected-item-cropfield.component.ts @@ -1,5 +1,5 @@ import { Location } from '@angular/common'; -import { Component, Inject, Injectable, OnInit } from '@angular/core'; +import { Component, Injectable, OnInit } from '@angular/core'; import { Router } from '@angular/router'; import { FolderService, IItem, IListItem, ItemService, ItemTypeService, commonReducers } from '@farmmaps/common'; import { Store } from '@ngrx/store'; @@ -23,7 +23,7 @@ export class SelectedItemCropfieldComponent extends AbstractSelectedItemComponen public items: Observable; - constructor(store: Store, @Inject('itemTypeService') itemTypeService: ItemTypeService, location: Location, router: Router, private itemService$: ItemService, private folderService$: FolderService) { + constructor(store: Store, itemTypeService: ItemTypeService, location: Location, router: Router, private itemService$: ItemService, private folderService$: FolderService) { super(store, itemTypeService,location,router); } diff --git a/projects/common-map/src/fm-map/components/selected-item-geotiff/selected-item-geotiff.component.ts b/projects/common-map/src/fm-map/components/selected-item-geotiff/selected-item-geotiff.component.ts index cd4c688..917b4dd 100644 --- a/projects/common-map/src/fm-map/components/selected-item-geotiff/selected-item-geotiff.component.ts +++ b/projects/common-map/src/fm-map/components/selected-item-geotiff/selected-item-geotiff.component.ts @@ -1,5 +1,5 @@ import { Location } from '@angular/common'; -import { Component, Inject, Injectable } from '@angular/core'; +import { Component, Injectable } from '@angular/core'; import { Router } from '@angular/router'; import { ItemTypeService, commonReducers } from '@farmmaps/common'; import { Store } from '@ngrx/store'; @@ -18,7 +18,7 @@ import { AbstractSelectedItemComponent } from '../selected-item/selected-item.co }) export class SelectedItemGeotiffComponent extends AbstractSelectedItemComponent { - constructor(store: Store, @Inject('itemTypeService') itemTypeService: ItemTypeService, location: Location, router: Router) { + constructor(store: Store, itemTypeService: ItemTypeService, location: Location, router: Router) { super(store, itemTypeService,location,router); }