aboutsummaryrefslogtreecommitdiffstats
path: root/webapp/src/app/app.component.ts
blob: 40cfb245e317f27fa855d77a6a1fdf906be83286 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
import { Component, OnInit, OnDestroy } from "@angular/core";
import { Router } from '@angular/router';
//TODO import {TranslateService} from "ng2-translate";

@Component({
    selector: 'app',
    templateUrl: './app/app.component.html',
    styleUrls: ['./app/app.component.css']
})

export class AppComponent implements OnInit, OnDestroy {

    isCollapsed: boolean = true;

    private defaultLanguage: string = 'en';

    // I initialize the app component.
    //TODO constructor(private translate: TranslateService) {
    constructor(public router: Router) {
    }

    ngOnInit() {

        /* TODO
        this.translate.addLangs(["en", "fr"]);
        this.translate.setDefaultLang(this.defaultLanguage);

        let browserLang = this.translate.getBrowserLang();
        this.translate.use(browserLang.match(/en|fr/) ? browserLang : this.defaultLanguage);
        */
    }

    ngOnDestroy(): void {
    }


}