import { Component, OnInit } from '@angular/core';
import { RouterExtensions } from '@nativescript/angular';
import * as appversion from 'nativescript-appversion';

@Component({
    selector: 'About',
    moduleId: module.id,
    templateUrl: './about.component.html',
    styleUrls: ['./_about.component.scss']
})

export class AboutComponent implements OnInit {
    actualYear: number;
    appVersion: string;

    constructor(
        private routerExtensions: RouterExtensions
    ) {
        this.actualYear = (new Date()).getFullYear();
    }

    ngOnInit(): void {

        appversion.getVersionName().then((v: string) => {
            this.appVersion = v;
        });
    }
}
