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

27 lines
568 B
TypeScript

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