diff --git a/src/app/shared/layout/layout.component.ts b/src/app/shared/layout/layout.component.ts index 9f5094f..8f8662b 100644 --- a/src/app/shared/layout/layout.component.ts +++ b/src/app/shared/layout/layout.component.ts @@ -1,4 +1,4 @@ -import { Component, OnInit, ChangeDetectorRef, OnDestroy, AfterViewInit } from '@angular/core'; +import { Component, OnInit, ChangeDetectorRef, OnDestroy, AfterViewInit, AfterContentChecked } from '@angular/core'; import { MediaMatcher } from '@angular/cdk/layout'; import { timer } from 'rxjs'; import { Subscription } from 'rxjs'; @@ -12,7 +12,7 @@ import { AuthGuard } from 'src/app/core/guards/auth.guard'; templateUrl: './layout.component.html', styleUrls: ['./layout.component.css'] }) -export class LayoutComponent implements OnInit, OnDestroy, AfterViewInit { +export class LayoutComponent implements OnInit, OnDestroy, AfterViewInit, AfterContentChecked { private _mobileQueryListener: () => void; mobileQuery: MediaQueryList; @@ -56,4 +56,8 @@ export class LayoutComponent implements OnInit, OnDestroy, AfterViewInit { ngAfterViewInit(): void { this.changeDetectorRef.detectChanges(); } + + ngAfterContentChecked(): void { + this.changeDetectorRef.detectChanges(); + } }