Mark for check on navigation
FarmMaps.Develop/FarmMapsLib/develop This commit looks good Details

pull/1/head
Willem Dantuma 2019-12-27 13:26:39 +01:00
parent 4b232cc0e4
commit ac5efdb40f
1 changed files with 11 additions and 2 deletions

View File

@ -1,4 +1,4 @@
import { Component, OnInit, OnDestroy, HostListener, Inject, ViewChild, AfterViewInit } from '@angular/core';
import { Component, OnInit, OnDestroy, HostListener, Inject, ViewChild, AfterViewInit,ChangeDetectorRef } from '@angular/core';
import { Location } from '@angular/common';
import { Observable, Subject, Subscription,combineLatest, from } from 'rxjs';
import { debounce, withLatestFrom, first, combineAll } from 'rxjs/operators';
@ -74,7 +74,15 @@ export class MapComponent implements OnInit, OnDestroy,AfterViewInit {
public extent: Observable<Extent>;
@ViewChild('map', { static: true }) map;
constructor(private store: Store<mapReducers.State | commonReducers.State>, private route: ActivatedRoute, private router: Router, private uploadService: ResumableFileUploadService, private serializeService: StateSerializerService, public itemTypeService: ItemTypeService, private location: Location, private geolocationService: GeolocationService ) {
constructor(private store: Store<mapReducers.State | commonReducers.State>,
private route: ActivatedRoute,
private router: Router,
private uploadService: ResumableFileUploadService,
private serializeService: StateSerializerService,
public itemTypeService: ItemTypeService,
private location: Location,
private geolocationService: GeolocationService,
private _ref: ChangeDetectorRef ) {
}
@HostListener('document:keyup', ['$event'])
@ -237,6 +245,7 @@ export class MapComponent implements OnInit, OnDestroy,AfterViewInit {
parts.push(mapState.baseLayerCode);
parts.push( this.serializeService.serialize(queryState));
this.router.navigate(parts, { replaceUrl: replace,relativeTo:this.route.parent });
this._ref.markForCheck();
}
}