import { Component, Injectable,AfterViewInit, OnInit} from '@angular/core'; import { Location } from '@angular/common'; import { AbstractFeatureListComponent } from '../feature-list/feature-list.component'; import {ForItemType } from '../for-item/for-itemtype.decorator'; import {ForChild } from '../for-item/for-child.decorator'; import { Store } from '@ngrx/store'; import * as mapReducers from '../../reducers/map.reducer'; import { commonReducers, ItemTypeService, IItem,ItemService } from '@farmmaps/common'; import { Observable } from 'rxjs'; @ForChild() @ForItemType("vnd.farmmaps.itemtype.cropfield") @Injectable() @Component({ selector: 'fm-map-feature-list-cropfield', templateUrl: './feature-list-cropfield.component.html', styleUrls: ['./feature-list-cropfield.component.scss'] }) export class FeatureListCropfieldComponent extends AbstractFeatureListComponent implements OnInit { constructor(store: Store, itemTypeService: ItemTypeService, location: Location, private itemService: ItemService) { super(store, itemTypeService,location); } public schemeItem: Observable ngOnInit() { this.schemeItem = this.itemService.getItem(this.queryState.parentCode); } }