diff --git a/src/app/components/sidenav-profile/sidenav-profile.component.html b/src/app/components/sidenav-profile/sidenav-profile.component.html index 0164f65..613d238 100644 --- a/src/app/components/sidenav-profile/sidenav-profile.component.html +++ b/src/app/components/sidenav-profile/sidenav-profile.component.html @@ -1,4 +1,4 @@ -
{{name}}
{{email}}
diff --git a/src/app/components/sidenav-profile/sidenav-profile.component.ts b/src/app/components/sidenav-profile/sidenav-profile.component.ts index c3aff0f..db42af7 100644 --- a/src/app/components/sidenav-profile/sidenav-profile.component.ts +++ b/src/app/components/sidenav-profile/sidenav-profile.component.ts @@ -1,6 +1,7 @@ import { Component, OnInit } from '@angular/core'; import { AuthService } from '../../services/auth.service'; import { SnackBarService } from '../../services/snackbar.service'; +import { NavService } from '../menu-list-item/nav.service'; @Component({ selector: 'sidenav-profile', @@ -12,7 +13,7 @@ export class SidenavProfileComponent implements OnInit { email: String; profileURL: String = '/assets/flotte_logo.png'; - constructor( private auth: AuthService, private snackBar: SnackBarService) { } + constructor( private auth: AuthService, private snackBar: SnackBarService, private navService: NavService) { } ngOnInit() { this.auth.currentUser.subscribe(user => { @@ -28,4 +29,8 @@ export class SidenavProfileComponent implements OnInit { testSnackBar(){ this.snackBar.openSnackBar("A user administration will be found here", "Ok"); } + + closeSidenav() { + this.navService.closeNav(); + } } \ No newline at end of file