aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/app.component.ts
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app/app.component.ts')
-rw-r--r--client/src/app/app.component.ts11
1 files changed, 10 insertions, 1 deletions
diff --git a/client/src/app/app.component.ts b/client/src/app/app.component.ts
index ef8597203..ba52c2102 100644
--- a/client/src/app/app.component.ts
+++ b/client/src/app/app.component.ts
@@ -1,5 +1,5 @@
1import { Component, OnInit } from '@angular/core' 1import { Component, OnInit } from '@angular/core'
2import { Router } from '@angular/router' 2import { NavigationEnd, Router } from '@angular/router'
3import { AuthService, ServerService } from '@app/core' 3import { AuthService, ServerService } from '@app/core'
4 4
5@Component({ 5@Component({
@@ -48,6 +48,15 @@ export class AppComponent implements OnInit {
48 if (window.innerWidth < 600) { 48 if (window.innerWidth < 600) {
49 this.isMenuDisplayed = false 49 this.isMenuDisplayed = false
50 } 50 }
51
52 this.router.events.subscribe(
53 e => {
54 // User clicked on a link in the menu, change the page
55 if (e instanceof NavigationEnd && window.innerWidth < 600) {
56 this.isMenuDisplayed = false
57 }
58 }
59 )
51 } 60 }
52 61
53 toggleMenu () { 62 toggleMenu () {