You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
477 B
TypeScript
22 lines
477 B
TypeScript
import { Component, OnInit } from '@angular/core';
|
|
import { Router, ActivatedRoute } from '@angular/router';
|
|
|
|
@Component({
|
|
selector: 'app-main',
|
|
templateUrl: './main.component.html',
|
|
styleUrls: ['./main.component.scss']
|
|
})
|
|
export class MainComponent implements OnInit {
|
|
|
|
constructor(private router: Router, private route: ActivatedRoute) { }
|
|
|
|
logout() {
|
|
localStorage.removeItem('jwtToken');
|
|
this.router.navigate(['login']);
|
|
}
|
|
|
|
ngOnInit() {
|
|
}
|
|
|
|
}
|