mirror of
https://github.com/simon987/task_tracker.git
synced 2025-12-14 07:19:02 +00:00
35 lines
792 B
TypeScript
35 lines
792 B
TypeScript
import {Component} from '@angular/core';
|
|
import {Router} from '@angular/router';
|
|
import {TranslateService} from "@ngx-translate/core";
|
|
import {AuthService} from "./auth.service";
|
|
|
|
@Component({
|
|
selector: 'app-root',
|
|
templateUrl: './app.component.html',
|
|
styleUrls: ['./app.component.css']
|
|
})
|
|
export class AppComponent {
|
|
|
|
langChange(lang: any) {
|
|
this.translate.use(lang.lang)
|
|
}
|
|
|
|
langList: any[] = [
|
|
{lang: "fr", display: "Français"},
|
|
{lang: "en", display: "English"},
|
|
];
|
|
|
|
constructor(private translate: TranslateService,
|
|
public router: Router,
|
|
public authService: AuthService) {
|
|
|
|
translate.addLangs([
|
|
"en",
|
|
"fr"
|
|
]);
|
|
|
|
translate.setDefaultLang("en");
|
|
}
|
|
|
|
}
|