mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-09 19:22:51 +00:00
committed by
Rainer Killinger
parent
1c56c891e1
commit
837c69bb21
@@ -438,7 +438,7 @@ export class MapPageComponent {
|
||||
this.distance = this.positionService.getDistance(this.items[0].geo.point);
|
||||
this.addToMap(this.items, true);
|
||||
this.ref.detectChanges();
|
||||
const url = this.router.createUrlTree(['/map/', uid]).toString();
|
||||
const url = this.router.createUrlTree([[], uid]).toString();
|
||||
this.location.go(url);
|
||||
// center the selected place
|
||||
this.focus(geoJSON(this.items[0].geo.point).getBounds().getCenter());
|
||||
|
||||
@@ -19,9 +19,9 @@ import {
|
||||
OnInit,
|
||||
ViewChild,
|
||||
} from '@angular/core';
|
||||
import {ActivatedRoute} from '@angular/router';
|
||||
import {Location} from '@angular/common';
|
||||
import {ActivatedRoute, Router} from '@angular/router';
|
||||
import {AnimationController, ModalController} from '@ionic/angular';
|
||||
import {last} from 'lodash-es';
|
||||
import {SharedAxisChoreographer} from '../../../animation/animation-choreographer';
|
||||
import {materialSharedAxisX} from '../../../animation/material-motion';
|
||||
import {ModalEventCreatorComponent} from './modal/modal-event-creator.component';
|
||||
@@ -136,6 +136,8 @@ export class SchedulePageComponent implements OnInit, AfterViewInit {
|
||||
private readonly modalController: ModalController,
|
||||
private readonly activatedRoute: ActivatedRoute,
|
||||
private readonly animationController: AnimationController,
|
||||
private router: Router,
|
||||
private location: Location,
|
||||
) {}
|
||||
|
||||
ngOnInit() {
|
||||
@@ -172,13 +174,10 @@ export class SchedulePageComponent implements OnInit, AfterViewInit {
|
||||
* When the segment changes
|
||||
*/
|
||||
onSegmentChange() {
|
||||
window.history.replaceState(
|
||||
{},
|
||||
'',
|
||||
`/#/schedule/${this.segmentView.value}/${last(
|
||||
window.location.href.split('/'),
|
||||
)}`,
|
||||
);
|
||||
const url = this.router
|
||||
.createUrlTree([[], this.segmentView.value])
|
||||
.toString();
|
||||
this.location.go(url);
|
||||
this.tabChoreographer.changeViewForState(this.segmentView.value);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user