Commit dd6bd0d1 authored by dev0tion's avatar dev0tion

Add logout

parent 15b10383
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
<li class="nav-item"><a class="nav-link" routerLink="send">Send</a></li> <li class="nav-item"><a class="nav-link" routerLink="send">Send</a></li>
<li class="nav-item"><a class="nav-link" routerLink="receive">Receive</a></li> <li class="nav-item"><a class="nav-link" routerLink="receive">Receive</a></li>
<li class="nav-item"><a class="nav-link" routerLink="history">History</a></li> <li class="nav-item"><a class="nav-link" routerLink="history">History</a></li>
<li class="nav-item"><a class="nav-link" (click)="logOut()">Logout</a></li>
</ul> </ul>
</div> </div>
</nav> </nav>
import { Component } from '@angular/core'; import { Component } from '@angular/core';
import { Router } from '@angular/router';
@Component({ @Component({
selector: 'app-menu', selector: 'app-menu',
...@@ -6,5 +7,9 @@ import { Component } from '@angular/core'; ...@@ -6,5 +7,9 @@ import { Component } from '@angular/core';
styleUrls: ['./menu.component.css'], styleUrls: ['./menu.component.css'],
}) })
export class MenuComponent { export class MenuComponent {
constructor(private router: Router) {}
private logOut() {
this.router.navigate(['/login']);
}
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment