import { Component, OnInit } from '@angular/core';
import {NavController} from "@ionic/angular";
import {Router} from "@angular/router";

@Component({
  selector: 'app-logout',
  templateUrl: './logout.page.html',
  styleUrls: ['./logout.page.scss'],
})
export class LogoutPage implements OnInit {

  constructor(
      private navctr: NavController,
      private router: Router
  ) {

  }

  ngOnInit() {
    this.returnToLogin(this.router);
  }
returnToLogin(router: Router){
  setTimeout(function(){
    //  this.onBack();
    router.navigate(['login']);
  }, 5000);
}
  onBack() {
    this.router.navigate(['login']);
  }
}
