import { Component, OnInit } from '@angular/core';
import { Router } from '@angular/router';
import { BackendService } from '../../services/backend/backend.service';

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

	constructor(private bs:BackendService,
		    private router:Router) { }

	ngOnInit(): void {
	}

	logout(): void {
		this.bs.logoutUser().subscribe(
			data => {
				this.router.navigateByUrl("/login");
			}, err => {
			});
	}

}
