import { Component } from "@angular/core" ; import { Router } from "@angular/router" ; import { AuthService } from "../auth/auth.service" ; @ Component ( { selector : "db-navbar" , template : require ( "./navbar.component.html" ) } ) export class NavbarComponent { constructor ( private authService , private router ) { } logout ( ) { this . authService . signOut ( ) ; this . router . navigateByUrl ( "/login" ) ; } }