funky-framadate-front/src/app/app.component.ts

27 lines
568 B
TypeScript
Raw Normal View History

2019-09-27 16:10:03 +02:00
import {Component} from '@angular/core';
2019-10-01 15:43:37 +02:00
import {TranslateService} from "@ngx-translate/core";
@Component({
2019-09-27 16:10:03 +02:00
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.scss']
})
export class AppComponent {
2019-09-27 16:10:03 +02:00
title = 'framadate';
//translation demo:
minutes = 12;
2019-10-01 15:43:37 +02:00
user = {
name: 'Arthur',
age: 42
};
constructor(private translate: TranslateService) {
this.translate.setDefaultLang('fr');
}
switchLanguage(language: string) {
this.translate.use(language);
}
}