header.component.ts 589 Bytes
Newer Older
Vitali Stupin's avatar
Vitali Stupin committed
1
2
3
4
5
6
7
8
9
10
11
12
import { Component, OnInit } from '@angular/core';
import { LanguagesService } from '../languages.service';

@Component({
  selector: 'app-header',
  templateUrl: './header.component.html',
  styleUrls: ['./header.component.css']
})
export class HeaderComponent implements OnInit {

  constructor(private languagesService: LanguagesService) { }

Vitali Stupin's avatar
Vitali Stupin committed
13
14
  getLangs(): string[] {
    return this.languagesService.getLangs();
Vitali Stupin's avatar
Vitali Stupin committed
15
16
  }

Vitali Stupin's avatar
Vitali Stupin committed
17
18
  getLang(): string {
    return this.languagesService.getLang();
Vitali Stupin's avatar
Vitali Stupin committed
19
20
21
  }

  setLang(lang: string) {
Vitali Stupin's avatar
Vitali Stupin committed
22
    return this.languagesService.setLang(lang);
Vitali Stupin's avatar
Vitali Stupin committed
23
  }
Vitali Stupin's avatar
Vitali Stupin committed
24
25

  ngOnInit() {}
Vitali Stupin's avatar
Vitali Stupin committed
26
}