From 65bc9fbd3d3c3b03367a6bd09fece0226b8bcb34 Mon Sep 17 00:00:00 2001 From: FlayInAHook Date: Fri, 4 Dec 2020 08:50:02 +0100 Subject: [PATCH] fixed sidenav click --- .../sidenav-profile/sidenav-profile.component.html | 2 +- .../sidenav-profile/sidenav-profile.component.ts | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) 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