Skip to content
Snippets Groups Projects
menu-nav.component.ts 883 B
Newer Older
  • Learn to ignore specific revisions
  • Alex ORLUC's avatar
    Alex ORLUC committed
    import { Component, OnInit } from '@angular/core';
    
    import { Location } from '@angular/common';
    
    import { Router, ActivatedRoute } from '@angular/router';
    
    Alex ORLUC's avatar
    Alex ORLUC committed
    import { HttpClient } from '@angular/common/http';
    import { LANG } from '../translate.component';
    
    declare function $j(selector: any) : any;
    
    @Component({
        selector: 'menu-nav',
    
        templateUrl :   "menuNav.component.html",
    
    Alex ORLUC's avatar
    Alex ORLUC committed
    })
    export class MenuNavComponent implements OnInit {
    
        lang: any = LANG;
    
    Alex ORLUC's avatar
     
    Alex ORLUC committed
        router :any;
    
    Alex ORLUC's avatar
    Alex ORLUC committed
    
    
        constructor(
            public http: HttpClient, 
            private _router: Router, 
    
            private activatedRoute:ActivatedRoute,
            private _location: Location
    
    Alex ORLUC's avatar
     
    Alex ORLUC committed
            this.router = _router;
    
    Alex ORLUC's avatar
    Alex ORLUC committed
        }
    
    
        ngOnInit(): void { }
    
    Alex ORLUC's avatar
    Alex ORLUC committed
    
        backClicked() {
    
            //this.router.navigate(['../'],{ relativeTo: this.activatedRoute });
            this._location.back();
    
    Alex ORLUC's avatar
    Alex ORLUC committed
        }
    }