Skip to content
Snippets Groups Projects
Commit 06c509b0 authored by Pegane Nestor's avatar Pegane Nestor
Browse files

FEAT #7797 relative route navigation

parent 2b5842b7
No related branches found
No related tags found
No related merge requests found
import { Component, OnInit } from '@angular/core';
import { Router } from '@angular/router';
import { Router, ActivatedRoute } from '@angular/router';
import { HttpClient } from '@angular/common/http';
import {Location} from '@angular/common';
import { LANG } from '../translate.component';
......@@ -19,7 +19,7 @@ export class MenuNavComponent implements OnInit {
coreUrl : string;
router :any;
constructor(public http: HttpClient, private _location: Location, private _router: Router) {
constructor(public http: HttpClient, private _location: Location, private _router: Router, private activatedRoute:ActivatedRoute) {
this.router = _router;
}
......@@ -28,6 +28,6 @@ export class MenuNavComponent implements OnInit {
}
backClicked() {
this._location.back();
this.router.navigate(['../'],{ relativeTo: this.activatedRoute });
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment